lua-fltk4lua
lua-fltk4lua copied to clipboard
Most current way to install (on Windows)
I notice that the luaRocks versions haven't been updated in 3 years, and that the makefile is pretty much built for a UNIX environment. What is the preferred way to install this on a windows computer? Cygwin? MinGW?
I have used LuaRocks (configured for MinGW or MSVC) to build fltk4lua. I have never tried it with Cygwin. Some short instructions are in the Wiki here.
@siffiejoe: I managed to build using MSVC today, but the instructions seem outdated. Your luarocks-build-cpp package does not seem to be compatible with luarocks 3, while the 'main' manifest version does work.
Also, the fltk .lib libraries in $FLKT/libs were called differently than what your rockspec looks for:
libraries = {
- "fltk_images",
- "fltk_jpeg",
- "fltk_png",
- "fltk_z",
+ "fltkimages",
+ "fltkjpeg",
+ "fltkpng",
+ "fltkzlib",
"fltk",
with these changes everything worked fine :)
For others struggling with this: to get FTLK in the first place, I downloaded and unpacked the source, then opened the "2010" SLN file in the ide/ subdirectory and built the fltkdll project (in release mode). I then built it with FLTK_INCDIR=/path/to/fltk-1.3.5 FLTK_LIBDIR=/path/to/fltk-1.3.5/libs. As far as I understand this should link fully statically, which means that you can then delete/remove the fltk directory, and it should be possible to move the resulting fltk4lua.dll to other systems.
luarocks-build-cpp has a new maintainer and has been updated in the main LuaRocks manifest. I've removed the section recommending my own (now obsolete) version from this wiki. The library names seem to have changed at some point. I still have the old names on my Ubuntu installation of libfltk-1.3, so I haven't changed the rockspec just yet.