JakobOvrum/LuaD

makefile compile problem

nikibobi opened this issue · 1 comments

When I try to compile the library using the cmd make in the base directory I get this:
Error on line 1: expecting target : dependencies error.
I am not experienced in makefiles so am I doing something wrong? Help with a little bit of explanation would be nice.

Also do I need to download the lua51.lib file? I want to make static library not dll. Thanks

What version of make are you using? Make sure it's something like GNU make, not DigitalMars make, which comes with the DMD distribution. However, the makefile is written for DMD on Linux (where DMD uses GNU LD to link, not OPTLINK), and isn't designed to work on Windows.

As for the second question, there are no binary distributions of LuaD on Github (you could, however, grab Linux binaries from the autotester). The lua51.lib download is for Lua itself, which LuaD depends on. How you link to Lua 5.1 is up to you, the lua51.lib import library is just for convenience. If you want to statically link Lua using DMD, you have to procure a static library of Lua 5.1 in the OMF format, either by building Lua with DMC (DigitalMars C) or building with MSVC or GCC first, then converting the output to OMF using some kind of conversion tool (perhaps objconv can do it).