FLTK-C-1.3.3 for FreeBASIC

Headers, Bindings, Libraries for use with FreeBASIC, Please include example of use to help ensure they are tested and usable.
Post Reply
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: FLTK-C-1.3.3 for FreeBASIC

Post by D.J.Peters »

fly wrote:I try to rebuild the "fltk-c-1.3.3-src.zip" to generate the static library, but the "fltk-c-1.3.3-src.zip" can't be compiled successfully.
To kompile fltk-c runtime you need all fltk-cpp dependencies see first post.

you need fltk-1.3.3.zip, fltk-c-1.3.3.zip and fltk-c-1.3.3-src.zip

fltk-c-1.3.3-src depends on fltk-1.3.3 and used fltk-c-1.3.3 as target folder.

extrakt all zip files in any folder with write access something like

yourfolder/fltk-1.3.3
yourfolder/fltk-c-1.3.3
yourfolder/fltk-c-1.3.3-src

now open with code::blocks yourfolder/fltk-c-1.3.3-src/fltk-c-wrapper-1.3.3-dynamic.cbp and compile it.

Of course you can build a static lib also but FreeBASIC isn't C++ and used a different memory layout in some cases the differences are minimal but a crash is a crash :-)

By the way the dynamic C-wrapper I wrote is only ~1.5MB much smaller than the original fltk-c++ dynamic runtime !

Joshy

Here are the build log if you have all three folders extracted before:
Code::blocks wrote:-------------- Build: win32 in fltk-c-wrapper-1.3.3-dynamic (compiler: GNU GCC Compiler)---------------
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-box.cpp -o obj\win32\fltk-c-wrapper-box.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-browsers.cpp -o obj\win32\fltk-c-wrapper-browsers.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-buttons.cpp -o obj\win32\fltk-c-wrapper-buttons.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-canvas.cpp -o obj\win32\fltk-c-wrapper-canvas.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-chart.cpp -o obj\win32\fltk-c-wrapper-chart.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-choice.cpp -o obj\win32\fltk-c-wrapper-choice.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-clock.cpp -o obj\win32\fltk-c-wrapper-clock.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-colorchooser.cpp -o obj\win32\fltk-c-wrapper-colorchooser.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-dialogs.cpp -o obj\win32\fltk-c-wrapper-dialogs.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-drawing.cpp -o obj\win32\fltk-c-wrapper-drawing.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-fl.cpp -o obj\win32\fltk-c-wrapper-fl.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-groups.cpp -o obj\win32\fltk-c-wrapper-groups.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-helpview.cpp -o obj\win32\fltk-c-wrapper-helpview.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-images.cpp -o obj\win32\fltk-c-wrapper-images.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-input.cpp -o obj\win32\fltk-c-wrapper-input.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-menus.cpp -o obj\win32\fltk-c-wrapper-menus.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-nfc.cpp -o obj\win32\fltk-c-wrapper-nfc.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-paged-surface.cpp -o obj\win32\fltk-c-wrapper-paged-surface.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-preferences.cpp -o obj\win32\fltk-c-wrapper-preferences.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-progress.cpp -o obj\win32\fltk-c-wrapper-progress.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-surface.cpp -o obj\win32\fltk-c-wrapper-surface.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-table.cpp -o obj\win32\fltk-c-wrapper-table.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-text.cpp -o obj\win32\fltk-c-wrapper-text.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-tools.cpp -o obj\win32\fltk-c-wrapper-tools.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-tooltip.cpp -o obj\win32\fltk-c-wrapper-tooltip.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-treeview.cpp -o obj\win32\fltk-c-wrapper-treeview.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-uri.cpp -o obj\win32\fltk-c-wrapper-uri.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-utf8.cpp -o obj\win32\fltk-c-wrapper-utf8.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-valuator.cpp -o obj\win32\fltk-c-wrapper-valuator.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-widget.cpp -o obj\win32\fltk-c-wrapper-widget.o
g++.exe -Wall -finline-functions -DBUILD_DLL -DNDEBUG -m32 -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN -DWIN32_EXTRA_LEAN -I..\fltk-1.3.3 -I..\fltk-1.3.3\zlib -I..\fltk-1.3.3\png -I..\fltk-1.3.3\jpeg -c D:\CodeBlocks\joshy\fltk-c-1.3.3-src\fltk-c-wrapper-windows.cpp -o obj\win32\fltk-c-wrapper-windows.o
g++.exe -shared -Wl,--dll -L..\fltk-1.3.3\lib\win32 obj\win32\fltk-c-wrapper-box.o obj\win32\fltk-c-wrapper-browsers.o obj\win32\fltk-c-wrapper-buttons.o obj\win32\fltk-c-wrapper-canvas.o obj\win32\fltk-c-wrapper-chart.o obj\win32\fltk-c-wrapper-choice.o obj\win32\fltk-c-wrapper-clock.o obj\win32\fltk-c-wrapper-colorchooser.o obj\win32\fltk-c-wrapper-dialogs.o obj\win32\fltk-c-wrapper-drawing.o obj\win32\fltk-c-wrapper-fl.o obj\win32\fltk-c-wrapper-groups.o obj\win32\fltk-c-wrapper-helpview.o obj\win32\fltk-c-wrapper-images.o obj\win32\fltk-c-wrapper-input.o obj\win32\fltk-c-wrapper-menus.o obj\win32\fltk-c-wrapper-nfc.o obj\win32\fltk-c-wrapper-paged-surface.o obj\win32\fltk-c-wrapper-preferences.o obj\win32\fltk-c-wrapper-progress.o obj\win32\fltk-c-wrapper-surface.o obj\win32\fltk-c-wrapper-table.o obj\win32\fltk-c-wrapper-text.o obj\win32\fltk-c-wrapper-tools.o obj\win32\fltk-c-wrapper-tooltip.o obj\win32\fltk-c-wrapper-treeview.o obj\win32\fltk-c-wrapper-uri.o obj\win32\fltk-c-wrapper-utf8.o obj\win32\fltk-c-wrapper-valuator.o obj\win32\fltk-c-wrapper-widget.o obj\win32\fltk-c-wrapper-windows.o -o ..\fltk-c-1.3.3\fltk-c-1.3.3-32.dll -s -m32 -static -lfltk -lfltk_forms -lfltk_images -lfltk_png -lfltk_jpeg -lfltk_zlib -lfltk_gl -lpthread -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lopengl32 -lcomctl32
Output file is ..\fltk-c-1.3.3\fltk-c-1.3.3-32.dll with size 1.50 MB
fly
Posts: 5
Joined: Nov 08, 2021 6:51

Re: FLTK-C-1.3.3 for FreeBASIC

Post by fly »

Thank you very much.
srvaldez
Posts: 3373
Joined: Sep 25, 2005 21:54

Re: FLTK-C-1.3.3 for FreeBASIC

Post by srvaldez »

thank you D.J.Peters :-)
BasicJedi
Posts: 13
Joined: Mar 21, 2021 13:38

Re: FLTK-C-1.3.3 for FreeBASIC

Post by BasicJedi »

Hello. I'm experimenting with FLTK and I made this little, GUI for MPlayer:

Code: Select all

#Include "fltk-c.bi"
'--------------------------------
Const MP_EXE="mp\mplayer.exe" 
dim shared  FILE as string' = "c.avi"
'FILE="video.avi"
'--------------------------------
Dim Shared As Fl_WindowEx Ptr WinMain : Dim Shared As Fl_Double_WindowEx Ptr WinPlayer
Dim Shared As FL_Button Ptr  play_control_btn (8)
Dim Shared As String*3 pseudo_icon(8)=> {" |>","||", "[]", "<<", ">>"}
'--------------------------------
Sub PlayVideo Cdecl (Byval self As Fl_Widget Ptr)
        Dim As String args =  " -slave  -nomouseinput -nofs -vo direct3d -ao dsound -speed 1 -framedrop -input file=tmp "
        Open Pipe MP_EXE & " " &  args &"  -wid " & Fl_XID(WinPlayer) &" "  & FILE For Output As #1
End Sub
Sub PauseVideo Cdecl (Byval self As Fl_Widget Ptr)
        Open "tmp" For Output As #2  :  Print  #2, "Pause" : Close #2
End Sub
Sub StopVideo Cdecl (Byval self As Fl_Widget Ptr)
        Open "tmp" For Output As #2  :  Print  #2, "Stop" : Close #2
End Sub
Sub SpeedUpVideo Cdecl (Byval self As Fl_Widget Ptr)
        Open "tmp" For Output As #2  :  Print  #2, "Speed 4" : Close #2
End Sub
Sub SlowDownVideo Cdecl (Byval self As Fl_Widget Ptr)
        Open "tmp" For Output As #2  :  Print  #2, "Speed 1.25" : Close #2
End Sub
function DragAndDrop cdecl (byval self as any ptr,byval event as FL_EVENT) as long
  static as integer ActiveDND=0
  select case as const event
  case FL_EVENT_DND_ENTER   : ActiveDND=1 : return 1
  case FL_EVENT_DND_LEAVE   : ActiveDND=0 : return 1
  case FL_EVENT_DND_DRAG , FL_EVENT_DND_RELEASE : return 1
  case FL_EVENT_PASTE : if ActiveDND then print *Fl_EventText(): FILE= *Fl_EventText(): ActiveDND=0 : return 1 
  end select 
  return Fl_WindowExHandleBase(self,event)
end function

Sub Create_Window_Main(x As Integer ,y As Integer,w As Integer,h As Integer)
        Const BtnH =32 'button height
        Dim As Integer i
'======================Main Window==============================
        WinMain = Fl_WindowExNew2(x,y,w,h,"$%#@ - the most $%#@ media player in the world ")
        Fl_WindowBegin WinMain
'----------------------TOOLBAR----------------------------------
                Dim As Fl_Pack   Ptr toolbar = Fl_PackNew(0,h-BtnH,w,BtnH)
                Fl_GroupBegin toolbar  
                        Fl_WidgetSetType   toolbar,FL_PACK_HORIZONTAL         ' horizontal packing of buttons
                        Fl_WidgetSetBox    toolbar,FL_ENGRAVED_FRAME
                        Fl_PackSetSpacing  toolbar,2                          ' spacing between buttons
                        For i  As Integer = 0 To Ubound(play_control_btn)       'Create player control buttons
                                play_control_btn(i)=Fl_ButtonNew( 0,0,BtnH,BtnH,pseudo_icon(i))
                                Fl_WidgetSetBox play_control_btn(i),Boxtype(FL_ROUND_UP_BOX)
                                Fl_widgetClearVisibleFocus  play_control_btn(i)
                        Next 
                        Var empty =Fl_BoxNew( 0,0,0,0, "Drag & drop video file")  'fill toolbar with empty box
                Fl_GroupEnd toolbar
'------------------------PlayerWindow----------------------------
                WinPlayer = Fl_Double_WindowExNew2(0,0,w,h-BtnH-4)
                 Fl_WindowBegin WinPlayer
                        Fl_WidgetSetBox WinPlayer,Boxtype(FL_DOWN_BOX)
                        Fl_WindowResizeable toolbar,empty
                        Fl_WidgetSetColor(WinPlayer,Fl_RGB_Color(0,0,0))
                        Fl_Double_WindowExSetHandleCB WinPlayer,@DragAndDrop '<--drag&drop here
                Fl_WindowEnd WinPlayer
                Fl_WindowResizeable  WinMain,WinPlayer
        Fl_WindowEnd WinMain
'======================Set Actions==============================
        Fl_WidgetSetCallback0   play_control_btn(0),@PlayVideo
        Fl_WidgetSetCallback0   play_control_btn(1),@PauseVideo
        Fl_WidgetSetCallback0   play_control_btn(2),@StopVideo
        Fl_WidgetSetCallback0   play_control_btn(3),@SlowDownVideo
        Fl_WidgetSetCallback0   play_control_btn(4),@SpeedUpVideo
End Sub
'Main program:
Create_Window_Main (200,200,640,480)
Fl_WindowSizeRange(WinMain,580,320) 
Fl_WindowShow(WinMain) :Fl_Run
Close #1 : Kill "tmp" : End
To run download MPlayer I tryed both versions on Win7. It's about 50mb.
https://sourceforge.net/projects/mplayer-win32/
https://github.com/RamonUnch/MPlayer-Ri ... s/releases
update path to mplayer.exe in code
Drag&drop video file to window (or set file path in code)
Click Play.
But I sill can't understand how to force other buttons to interact with MPlayer (slave mode). Program is writing command to tmp file and the file is accepted by MPlayer, but only at start (try clicking pause, stop or speed up button before clicking play)
Also find this tutorial https://www.codeproject.com/Articles/64 ... n-Media-Pl
but it help me (it's for VisualBasic I think)
Anyone knows?
Ok123
Posts: 3
Joined: Jul 22, 2022 17:56

Re: FLTK-C-1.3.3 for FreeBASIC

Post by Ok123 »

Hello,
how can I compile the "libfltk-c-1.3.3-64.so" on Linux (with "Code::Blocks").

I tried the following.

Code: Select all

g++ -shared -L../build/lib obj/lin64/fltk-c-wrapper-box.o obj/lin64/fltk-c-wrapper-browsers.o obj/lin64/fltk-c-wrapper-buttons.o obj/lin64/fltk-c-wrapper-canvas.o obj/lin64/fltk-c-wrapper-chart.o obj/lin64/fltk-c-wrapper-choice.o obj/lin64/fltk-c-wrapper-clock.o obj/lin64/fltk-c-wrapper-colorchooser.o obj/lin64/fltk-c-wrapper-dialogs.o obj/lin64/fltk-c-wrapper-drawing.o obj/lin64/fltk-c-wrapper-fl.o obj/lin64/fltk-c-wrapper-groups.o obj/lin64/fltk-c-wrapper-helpview.o obj/lin64/fltk-c-wrapper-images.o obj/lin64/fltk-c-wrapper-input.o obj/lin64/fltk-c-wrapper-menus.o obj/lin64/fltk-c-wrapper-nfc.o obj/lin64/fltk-c-wrapper-paged-surface.o obj/lin64/fltk-c-wrapper-preferences.o obj/lin64/fltk-c-wrapper-progress.o obj/lin64/fltk-c-wrapper-surface.o obj/lin64/fltk-c-wrapper-table.o obj/lin64/fltk-c-wrapper-text.o obj/lin64/fltk-c-wrapper-tools.o obj/lin64/fltk-c-wrapper-tooltip.o obj/lin64/fltk-c-wrapper-treeview.o obj/lin64/fltk-c-wrapper-uri.o obj/lin64/fltk-c-wrapper-utf8.o obj/lin64/fltk-c-wrapper-valuator.o obj/lin64/fltk-c-wrapper-widget.o obj/lin64/fltk-c-wrapper-windows.o  -o ../fltk-c-1.3.3/libfltk-c-1.3.3-64.so -s -m64 -fPIC -lGL -lX11 -lXft -lXinerama -lXcursor
Before that I also successfully compiled the shared library with (fltk1.3.3) with CMAKE.

But the library created is only "926.9 KiB (949,184 bytes)" in size.
(No errors when compiling.)

When embedding, there are always errors like:

Code: Select all

/usr/bin/ld: /home/user/desktop/fltk/libfltk-c-1.3.3-64.so: undefined reference to `Fl_Tree_Item::replace_child(Fl_Tree_Item*, Fl_Tree_Item*)'
/usr/bin/ld: /home/user/desktop/fltk/libfltk-c-1.3.3-64.so: undefined reference to `Fl_Tooltip::wrap_width_'
/usr/bin/ld: /home/user/desktop/fltk/libfltk-c-1.3.3-64.so: undefined reference to `Fl_Tree_Item::Fl_Tree_Item(Fl_Tree*)'
/usr/bin/ld: /home/user/dektop/fltk/libfltk-c-1.3.3-64.so: undefined reference to `Fl_Tree_Item_Array::swap(int, int)'
/usr/bin/ld: /home/user/desktop/fltk/libfltk-c-1.3.3-64.so: undefined reference to `Fl_Tooltip::margin_width_'
/usr/bin/ld: /home/user/desktop/fltk/libfltk-c-1.3.3-64.so: undefined reference to `Fl_Tree::item_draw_mode(int)'
/usr/bin/ld: /home/user/desktop/fltk/libfltk-c-1.3.3-64.so: undefined reference to `Fl_Tree::item_draw_mode() const'
...
How do I get a working library created?

Your library is also "2.2 MiB (2,343,488 bytes)" and works. How did you create these on Linux?
Ok123
Posts: 3
Joined: Jul 22, 2022 17:56

Re: FLTK-C-1.3.3 for FreeBASIC

Post by Ok123 »

Also, I had to adjust some paths correctly first.
fl/..
becomes FL/..

There is something wrong with your source code.

But I can't get a mountable library compiled.

I don't want static (-static) with integration of all .a files created with CMAKE.

It should already be (-shared).
Ok123
Posts: 3
Joined: Jul 22, 2022 17:56

Re: FLTK-C-1.3.3 for FreeBASIC

Post by Ok123 »

Hello,
it works now.

I added the following linker/compiler flags:

Code: Select all

-Wl,--no-allow-shlib-undefined -Wl,-z,defs
This information helps to find undefined references.

I have with "pacman -S fltk"
installed the latest fltk libraries (.so) into the /usr/lib directory and passed this (-lfltk -lfltk_images -lfltk_forms -lfltk_gl) to the compiler at the end.

The created library is now still 926.8 KB (949,088 bytes) but can be used.

That solves the problem.
VANYA
Posts: 1834
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: FLTK-C-1.3.3 for FreeBASIC

Post by VANYA »

@D.J.Peters

Fl_GetFontSizes missing in the 64-bit version of the DLL.
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: FLTK-C-1.3.3 for FreeBASIC

Post by D.J.Peters »

VANYA wrote: Sep 16, 2022 6:59Fl_GetFontSizes missing in the 64-bit version of the DLL.
I compiled and executed Fl_GetFontSizes01.exe with 64-bit compiler and OS without any problem ?

Joshy
Image
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: FLTK-C-1.3.3 for FreeBASIC

Post by D.J.Peters »

Here the result of the Dependency Walker :-)

Joshy
file: "fltk-c-1.3.3-64.dll" Image
Last edited by D.J.Peters on Sep 16, 2022 8:02, edited 1 time in total.
VANYA
Posts: 1834
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: FLTK-C-1.3.3 for FreeBASIC

Post by VANYA »

Looks like I have an older version on my computer. Downloaded your latest and everything is fine there. Sorry to bother you.
neotendo
Posts: 1
Joined: Sep 26, 2022 0:58

Re: FLTK-C-1.3.3 for FreeBASIC

Post by neotendo »

D.J.Peters wrote: Mar 28, 2016 8:09
FLTK- C-1.3.3 for FreeBASIC.

Download for FreeBASIC: fltk-c-1.3.3.zip Tue Aug 13, 2019

The C++ source code of the FLTK-C wrapper and Code::Blocks project: fltk-c-1.3.3-src.zip Tue Aug 13, 2019
Dependencies: fltk-1.3.3.zip

FLTK homepage

documentation:
online: FLTK 1.3.x
download PDF: FLTK 1.3.x Programming Manual

pdf: 2D and image drawing in FLTK

FreeBASIC tutorial:
-> english
-> german
-> french

How to start with FLTK C

Windows:
Download and extract fltk-c.1.3.3.zip with all folders on any drive:
optional run buildall.bat

Linux:
Download and extract fltk-c.1.3.3.zip with all folders in your home folder:
copy the extracted library to /usr/lib
ubuntu: sudo cp libfltk-c*.so /usr/lib
slackware: su -c "cp libfltk-c*.so /usr/lib"
or any other distro as root: cp libfltk-c*.so /usr/lib
optional run buildall.sh
chmod -x ./buildall.sh
sh ./buildall.sh

Joshy
can you tell me how i can get my icon from the exe file in the upper left corner (window icon)?
thank you in advance
VANYA
Posts: 1834
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: FLTK-C-1.3.3 for FreeBASIC

Post by VANYA »

Hi Joshy!

The Fl_Text_Editor03 example causes a problem when dragging text. Is this a problem in fltk or in an incorrect example?
Suggest video: https://disk.yandex.ru/i/3bGyPHG8RZ6IOA

P.S. linux x86-64
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: FLTK-C-1.3.3 for FreeBASIC

Post by D.J.Peters »

@VANYA this only a short test for "a litle bit syntax highlighting" not a working complete editor !
I never used mouse drag and drop inside this tiny example before.

The error heppents in the sub Highlight() may be the drag and drop operation must be handled at first
to be sure the pointers and size are correct while highlighting.

I think if a mouse operation starts (mouse drag) a flag (bDontHighlighting=true) must be set
end if the mouse operation ends (mouse drop) the flag are cleared and the changed block are are used in Highlight()

Joshy
VANYA
Posts: 1834
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: FLTK-C-1.3.3 for FreeBASIC

Post by VANYA »

Joshy! I tried setting the callback using Fl_WidgetSetCallback and Fl_WidgetSetCallback0 , but other events are caught there (for example, from the keyboard). Could you tell me how to set the callback in order to catch the DRAG event?
Post Reply