-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linkage error on windows with mingw32 compiler (when compiling C source libraries) #1567
Comments
@RedNeath thanks for reporting. A few questions:
I currently don't have a Windows machine to try these things myself, so help debugging Windows issues is greatly appreciated! |
No problem! :D Just to point a few things out, because I'm not sure I have been explicit enough in my first comment: the abovementionned error doesn't come when installing luarocks, but when installing packages (or "rocks" I believe).
|
Try compiling lua yourself, and in your luarocks config make it link with |
You're probably right. Sorry I didn't check that earlier but it seems I was wrong since the very beginning. From what I've seen, the mingw32 compiler actually uses the -L and -l options to link libraries, which means the command is probably correct. I didn't take a look at how the installed compiler is detected (or if it even just is), but the one I use is the msys clang arm compiler (as shown by the trace below).
I'll try to install Lua and Luarocks using this compiler someday and detail the installation procedure to make both run properly on an ARM 👍 |
I created this tutorial which should also work on ARM, if you replace the parts where I delete the ARM bits with deleting the x86_64 bits |
Platform:
LuaRocks version:
LuaRocks output from when the issue occurred:
-lMSVCR80
, it should beC:\Program Files (x86)\Luarocks/MSVCR80.dll
. I tested it by changing the lineextras[#extras+1] = "-l" .. (variables.MSVCRT or "m")
toextras[#extras+1] = dir.path(variables.LUA_LIBDIR, (variables.MSVCRT or "m")) .. ".dll"
in the builtin.lua script.Maybe this is not the most appropriate way to do it (especially the addition of ".dll" at the end), but it is just to give an example :)
The text was updated successfully, but these errors were encountered: