Joined: Oct. 2003
||Posted: June 19 2008,15:42
Here for all to see. Nothing more than a howto text file, excerpted from the README from the developers tarball.
|Code Sample |
|EXPERIMENTS WITH THE FLTK TOOLKIT, LUA, AND MURGLUA IN DAMNSMALLLINUX (DSL)|
Goal of this experiment is to find a light alternative to the murgaLua
/static build for calling fltk from lua in DSL. And also trying to allow
fltk to be used by C/C++ programs, not just by lua.
The solution is to provide a standard lua interpreter, the fltk toolkit
compiled as shared libraries, and compile the FLTK lua bindings from the
murgaLua project as a separate lua extension which make use of the fltk
Binaries and libs and examples were compiled in DSL using 'compile-3.3.5' extension.
Here's rough guidline if you want to do the compile the fltk,lua,murgalua stuff yourself, here's rough guideline:
Compilation of Lua (5.1.3) distribution
- in src/Makefile, change in CFLAGS the -O2 flag to -Os
- 'make linux' and then make install INSTALL_TOP=/path/to/installation
Compilation of fltk (1.1.9) distribution
- ./configure --prefix=/path/to/installation --enable-shared --disable-xft --disable-gl --with-optim="-Os -fno-exception -fno-rtti"
- make, and then make install
Compilation of fltk binding from murgaLua distribution (0.6.8, murga-projects.com/files).
- cd to src/ folder
- g++ -Os -fno-exceptions -fno-rtti -fpic -DLINUX -DLUA_USE_LINUX -I/path/to/lua_includes -Ipath/to/fltk_includes -c bind-fltk-ext.cxx
- g++ -Os -fno-exceptions -fno-rtti -shared -Wl,-soname,libmurgalua-fltk.so.0 -L/path/to/fltk_shared_libs -lftlk -lftlk_images -lflt_forms -lpng -o libmurgalua-fltk.so.0.6.8 ind-fltk-ext.o
As you can see not a single line of source code was changed.
All that is needed is this recipe.