-
Notifications
You must be signed in to change notification settings - Fork 527
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
Problem: MSVC2013 build.bat fails on project czmq_selftest with link error #1617
Comments
Everything is working on the CI: https://ci.appveyor.com/project/zeromq/czmq/build/build-826 Are you building with DRAFT APIs? That symbol is still in draft state |
Yes, building with DRAFT APIs, as it is set if
If I run Is there a step to regenerate the Is the CI build using cmake to generate czmq.sln and vcxproj files also? |
ztimerset and ztrie are draft yes |
The pre-generated visual studio solutions have to make a decision about
whether to include draft files or not.
In theory we could use some conditionals or project configurations to
choose between the 2 states, but it doesn't at the moment. This is a defect
in zproject I guess. Workaround is to use CMake.
…On 1 February 2017 at 16:20, Luca Boccassi ***@***.***> wrote:
ztimerset and ztrie are draft yes
The CI is using CMake but that's the extent of my knowledge of the windows
side, sorry
@bbdb68 <https://github.com/bbdb68> do you have any suggestion?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1617 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGDEB7LO2KNX9kTC0XjLgA-0bu7ys2lBks5rYLDcgaJpZM4LzFTx>
.
|
The proper VS approach is to expose the optional configuration using a property that sets a preprocessor define. This is exposed in the VS UI via an XML extension and accessible to builds via the msbuild command line. |
The Link error is due to source files czmq_private_selftest.c and zgossip_msg.c missing in the visual studio project. Once added as additional source files to the visual studio project, compilation works. Unfortunately I don't know how to add them to the zproject configuration as czmq_selftest is not explicitly mentioned in project.xml but seems to be somehow implicitly added. Could someone point me into the right direction? |
To elaborate on mlodew's comment. If compiling from the command line, add the following lines to the czmq_selftest.vcxproj file in the czmq_selftest directory for your msvs version:
after the line
As mlodew mentions, compilation works after that. Thanks mlodew for your temp workaround until this issue is resolved. |
This is how it was handled for other build systems: |
I had this same problem, @jacktrades52 fix worked for me on windows 10 with VS2017 |
This issue has been automatically marked as stale because it has not had recent activity for 90 days. It will be closed if no further activity occurs within 21 days. Thank you for your contributions. |
Running
msvc\vs2013\build.bat
fails on czmq_selftest project with the following link error:czmq_selftest.obj : error LNK2001: unresolved external symbol _czmq_private_selftest
Using latest czmq from git, Windows 10 Pro x64.
Related build.log output:
The text was updated successfully, but these errors were encountered: