Skip to content
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

Missing libs with lua 5.3 and windows x64 #13

Closed
LennyPenny opened this issue Mar 31, 2015 · 6 comments
Closed

Missing libs with lua 5.3 and windows x64 #13

LennyPenny opened this issue Mar 31, 2015 · 6 comments

Comments

@LennyPenny
Copy link

Hey I couldn't install this from luarocks because I got some linker errors.

Error 8 error LNK2001: unresolved external symbol GetAdaptersAddresses C:\Users\Lenny\Documents\GitHub\lua-lluv\msvc\libuv.lib(util.obj) lluv
Error 7 error LNK2001: unresolved external symbol GetProcessMemoryInfo C:\Users\Lenny\Documents\GitHub\lua-lluv\msvc\libuv.lib(util.obj) lluv

I cloned it and changed the linker config to this:
linker config

I'm using the latest master from the libuv repo build in x64 and lua 5.3 x64.
I had to add Iphlpapi.lib and Psapi.lib to the linker and ignore the LIBCMT default lib.

Is that fixable?

@LennyPenny LennyPenny changed the title Missing libs on windows x64 Missing libs with lua 5.3 and windows x64 Mar 31, 2015
@moteus
Copy link
Owner

moteus commented Mar 31, 2015

I think you use static link with libuv. In this case you should build lluv and libuv with same runtime.
Ignoring LIBCMT is not good choice.
Also you can change libraries = {"libuv", "ws2_32"} in rockspec to libraries = {"libuv", "ws2_32", "Iphlpapi", "Psapi"} and try install this.

I try test static link tomorrow and update rockspecs.

@LennyPenny
Copy link
Author

Thanks, yeah I'm using a static libuv lib

@moteus
Copy link
Owner

moteus commented Apr 2, 2015

Could you test luarocks install now?

@LennyPenny
Copy link
Author

Still getting the errors which made me disable LIBCMT but it's a step
errors

@LennyPenny LennyPenny reopened this Apr 2, 2015
@moteus
Copy link
Owner

moteus commented Apr 2, 2015

Try build libuv with same runtime as Lua.
lua.exe/lua.dll/lluv.dll should use same MSVC runtime library.
If you link Lua module with static lib this static lib also should use same runtime.
(Project options->C/C++->Code Generation->Runtime Library)

@LennyPenny
Copy link
Author

Woa awesome, thanks!
It's a bit weird to build a static lib with Multi-threaded DLL (/MD) but it did the job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants