FLTK-C-1.3.3 for FreeBASIC
Re: FLTK C for FreeBASIC.
Tested...and...IT WORKS! :-)
And yes, the "key" was STATIC.
And thanks, D.j.peters for the difference with Set and Copy
As request D.j.peters, could you post with the .Dll in the first post the "static" libraries for 32 and 64.dll?
(the "...dll.a " )
I have a lot of problems, with the errors making them.
And yes, the "key" was STATIC.
And thanks, D.j.peters for the difference with Set and Copy
As request D.j.peters, could you post with the .Dll in the first post the "static" libraries for 32 and 64.dll?
(the "...dll.a " )
I have a lot of problems, with the errors making them.
Re: FLTK C for FreeBASIC.
You can create the import library with pexports and dlltool :
Of course, replace XXX with the name of the FLTK library which you are using.
pexports.exe and dlltool.exe should be in your FreeBASIC bin\win... subdirectory
In case you don't have pexports in your FB installation, you can get here:
https://sourceforge.net/projects/mingw/ ... /pexports/
Alternatively, you can use tiny_impdef from the TCC (Tiny C compiler) distribution:
http://bellard.org/tcc/
Both pexports and tiny_impdef produce a text file with extension .def which contains the list of all the routines exported by the DLL.
Note: if using pexports, it may be necessary to edit the .def file by removing the first line, before using dlltool
Code: Select all
pexports XXX.dll > XXX.def
dlltool -D XXX.dll -d XXX.def -l libXXX.dll.a
pexports.exe and dlltool.exe should be in your FreeBASIC bin\win... subdirectory
In case you don't have pexports in your FB installation, you can get here:
https://sourceforge.net/projects/mingw/ ... /pexports/
Alternatively, you can use tiny_impdef from the TCC (Tiny C compiler) distribution:
http://bellard.org/tcc/
Both pexports and tiny_impdef produce a text file with extension .def which contains the list of all the routines exported by the DLL.
Note: if using pexports, it may be necessary to edit the .def file by removing the first line, before using dlltool
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: FLTK C for FreeBASIC.
can't edit first post ATM.
Joshy
Joshy
Last edited by D.J.Peters on Aug 13, 2016 21:44, edited 2 times in total.
Re: FLTK C for FreeBASIC.
*jdebord: i have both .exe, the problem was with dlltool, that returns errors like: "syntax error in def file".... and so.
I will try removing the first line as you say.
*Joshy: and thanks, for the quick answer.
I will try removing the first line as you say.
*Joshy: and thanks, for the quick answer.
Re: FLTK C for FreeBASIC.
I guess it would work well with C capable scripting languages like LuaJIT and Terra. I was also considering tcl/tk. So far I've been trying to communicate via pipes (sdtin and stdout) with "wish". That is super simple but also there are problems because there are no bidirectional pipes as such and there are potential deadlocking issues (eg. like you locked your keys in the car). I'll experiment around for a while and see what is the most stable, repeatable solution. Then look at making a simple Basic out of that.
http://terralang.org/
http://terralang.org/
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: FLTK C for FreeBASIC.
Fixed a small bug (Windows 32/64-bit) the fltk-c wrapper is -w pedantic compatible now.
(Windows 32/64-bit, Linux 32/64-bit and ARM 32-bit all in one zip archive)
Joshy
(Windows 32/64-bit, Linux 32/64-bit and ARM 32-bit all in one zip archive)
Joshy
-
- Posts: 139
- Joined: Feb 04, 2011 20:34
- Location: Ontario, Canada
Re: FLTK C for FreeBASIC.
Joshy
I've just downloaded the latest Linux fltk-c-1.3.3.zip, but I'm not seeing any lib*.so files. Am I missing something on account of my extreme old age?
Thanks
Rod
I've just downloaded the latest Linux fltk-c-1.3.3.zip, but I'm not seeing any lib*.so files. Am I missing something on account of my extreme old age?
Thanks
Rod
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: FLTK C for FreeBASIC.
@Rod yes the libs was missing should be fixed now.
Joshy
Joshy
-
- Posts: 139
- Joined: Feb 04, 2011 20:34
- Location: Ontario, Canada
Re: FLTK C for FreeBASIC.
Thanks Joshy
Rod
Rod
-
- Posts: 139
- Joined: Feb 04, 2011 20:34
- Location: Ontario, Canada
Re: FLTK C for FreeBASIC.
Joshy
There's a potentially recursive wrapper bug in fltk-c.bi -- the link points to the obsolete forum topic. :-)
Please report all FLTK C wrapper bugs and problems on the following page:
http://freebasic.net/forum/viewtopic.php?f=14&t=21548
Rod
There's a potentially recursive wrapper bug in fltk-c.bi -- the link points to the obsolete forum topic. :-)
Please report all FLTK C wrapper bugs and problems on the following page:
http://freebasic.net/forum/viewtopic.php?f=14&t=21548
Rod
-
- Posts: 139
- Joined: Feb 04, 2011 20:34
- Location: Ontario, Canada
Re: FLTK C for FreeBASIC.
Joshy
I really like the new commands. It's so much easier than playing with hidden fltk structures. However, I think there's an error in the following declares:
The Get function seems to be missing an item parm
Thanks
Rod
I really like the new commands. It's so much easier than playing with hidden fltk structures. However, I think there's an error in the following declares:
Code: Select all
' Set/Get a user-data value for the item.
declare sub Fl_Tree_ItemSetUserData(byval item as Fl_Tree_Item ptr, byval userdata as any ptr)
declare function Fl_Tree_ItemGetUserData() as any ptr
Thanks
Rod
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: FLTK C for FreeBASIC.
Hello rod you are right it must be:
Code: Select all
declare function Fl_Tree_ItemGetUserData(byval item as Fl_Tree_Item ptr) as any ptr
-
- Posts: 139
- Joined: Feb 04, 2011 20:34
- Location: Ontario, Canada
Re: FLTK C for FreeBASIC.
Thanks Joshy
Re: FLTK C for FreeBASIC.
This is very nice! You can rotate icons on buttons
Look at your numeric keyboard for meanings like 8 mean UP 4 mean left
It took me couple hrs to design some icons and then I figured out this trick
@ may be followed by
# to keep aspect ratio
+9 to make icons bigger can be any number 1 to 9. 9 is biggest
LIKE:
MOVROT.btn7 = Fl_ButtonNew(50, 30, 40, 40, "@#+97>>")
http://www.csounds.com/manual/html/FLbutton.html
Look at your numeric keyboard for meanings like 8 mean UP 4 mean left
Code: Select all
MOVROT.btn1 = Fl_ButtonNew(50, 130, 40, 40, "@1>>")
MOVROT.btn2 = Fl_ButtonNew(100, 130, 40, 40, "@2>>")
MOVROT.btn3 = Fl_ButtonNew(150, 130, 40, 40, "@3>>")
MOVROT.btn4 = Fl_ButtonNew(50, 80, 40, 40, "@4>>")
MOVROT.btn6 = Fl_ButtonNew(150, 80, 40, 40, "@6>>")
MOVROT.btn7 = Fl_ButtonNew(50, 30, 40, 40, "@7>>")
MOVROT.btn8 = Fl_ButtonNew(100, 30, 40, 40, "@8>>")
MOVROT.btn9 = Fl_ButtonNew(150, 30, 40, 40, "@9>>")
It took me couple hrs to design some icons and then I figured out this trick
@ may be followed by
# to keep aspect ratio
+9 to make icons bigger can be any number 1 to 9. 9 is biggest
LIKE:
MOVROT.btn7 = Fl_ButtonNew(50, 30, 40, 40, "@#+97>>")
http://www.csounds.com/manual/html/FLbutton.html
-
- Posts: 139
- Joined: Feb 04, 2011 20:34
- Location: Ontario, Canada
Re: FLTK C for FreeBASIC.
@ike
http://pyfltk.sourceforge.net/docs/CH0_Preface.html
Rod
I don't program in Python, but I've found the following documentation to be really useful. It's a lot easier to understand than the FLTK docs, and it helps make sense of Joshy's bindings. It's relatively easy to create FB classes that follow the general structure of the Python classes.ike wrote:This is very nice! You can rotate icons on buttons........It took me couple hrs to design some icons and then I figured out this trick
MOVROT.btn7 = Fl_ButtonNew(50, 30, 40, 40, "@#+97>>")
http://www.csounds.com/manual/html/FLbutton.html
http://pyfltk.sourceforge.net/docs/CH0_Preface.html
Rod