-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
Link Errors for nng in vs2019 #1212
Comments
Is the error in building NNG itself, or in trying to build your program(s) that use it? |
(For the record, I build NNG on Windows all the time with the VS compilers. I do it from the command line though, and not in the VS GUI. I have roughly zero experience with the VS GUI.) |
_imp_xx means dynamic link, however your nng is build by static. How to resolve: |
it's not nng's problem, it's your project config |
I had done it in the way you said but it didn't work |
I built nng and got nng.lib and nng.dll but when adding them in my project ,I got those errors that attached in first message |
I built nng similar to your way in command line but my project was built in VS GUI |
I had done all settings and errors are related to nng |
if nng MT, then your project MT |
Yes. I really need to have these flags inherited in the cmake parlance. The current way NNG does this is a bit hackish, and as noted here, error prone. (There's already a ticket filed for this. I probably won't fix for 1.3, but probably in 1.4.) |
I'm going to close this particular ticket, since it's clear that the problem doesn't represent a bug in NNG. (Modulo that other ticket I just referenced.) |
I am trying to build a nanomsg next gen (https://github.com/nanomsg/nng) on a windows box. I am using VS2019.
I am getting link errors.
the Linker/General/Additional Library Directories is:F:\nng-1.2.5\build
The .h files are read fine. But I am getting the following link errors:
These are my VS2019 settings (x64 .lib and x64 project).
at the end I should say that I built nng-1.2.5 as the following:
1-Download/clone NNG source
2-create Command Prompt suitable for Visual Studio:
Run x64 Visual Studio Developer Command Prompt to create a 64-bit library
3- then put cmake and Ninja in PATH environment variable
Run:
4-mkdir build && cd build
5-cmake -G Ninja -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release ..
6-ninja
please help me how to solve this problem;
thanks
The text was updated successfully, but these errors were encountered: