lua-fltk4lua icon indicating copy to clipboard operation
lua-fltk4lua copied to clipboard

Most current way to install (on Windows)

Open kingoftheconnors opened this issue 6 years ago • 3 comments

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?

kingoftheconnors avatar Jul 18 '19 02:07 kingoftheconnors

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 avatar Jul 20 '19 09:07 siffiejoe

@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.

s-ol avatar May 13 '20 10:05 s-ol

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.

siffiejoe avatar Jul 08 '20 19:07 siffiejoe