[zeromq-dev] Questions about the CMake config and MSVC (czmq/libzmq)

Kevin Sapper kevinsapper88 at gmail.com
Thu Jun 4 17:17:53 CEST 2020


Hi Arnaud,

I can feel your pain :(

Try to compare what you did against what zyre is doing:
https://github.com/zeromq/zyre/blob/master/appveyor.yml

Cheers
//Kevin

Am Do., 4. Juni 2020 um 14:11 Uhr schrieb Arnaud Loonstra <
arnaud at sphaero.org>:

> Hey all,
>
> I'm going mental on getting a build working on Windows. I'm following
> exactly the setup of Appveyor. This works fine. However when I try to
> use the cmzq library it gives unresolved external symbols to symbols
> from czmq. However the library is there, the tests were successful.
>
>
> The link command ends up being this:
>
> C:\Program Files (x86)\Microsoft Visual
> Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64
> \x64\link.exe /ERRORREPORT:QUEUE
> /OUT:"C:\msys64\home\ECT-Admin\src\libsphactor\msbuild\Debug\libsphactor.dll"
>
> /INCREMENTAL /NOLOGO ws2_32.lib Rpcrt4.lib Iphlpapi.lib
> "C:\out\lib\libzmq-v142-mt-gd-432.lib" C:\out\lib\libczmq.lib
> kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib
> oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST
> /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG
> /PDB:"C:/msys64/home/ECT-Admin/src/libsphactor/msbuild/Debug/libsphactor.pdb"
>
> /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT
> /IMPLIB:"C:/msys64/home/ECT-Admin/
> src/libsphactor/msbuild/Debug/sphactor.lib" /MACHINE:X64  /machine:x64
> /DLL sphactor.dir\Debug\sphactor.obj
> sphactor.dir\Debug\sphactor_actor.obj
> sphactor.dir\Debug\sphactor_private_selftest.obj
>
> Errors are
>
> Creating library
> C:/msys64/home/ECT-Admin/src/libsphactor/msbuild/Debug/sphactor.lib and
> object
>    C:/msys64/home/ECT-Admin/src/libsphactor/msbuild/Debug/sphactor.exp
>
> sphactor.obj : error LNK2019: unresolved external symbol
> __imp_zactor_new referenced in function spha
> ctor_new
> [C:\msys64\home\ECT-Admin\src\libsphactor\msbuild\sphactor.vcxproj]
>
> sphactor_actor.obj : error LNK2001: unresolved external symbol
> __imp_zactor_new [C:\msys64\home\ECT-A
> dmin\src\libsphactor\msbuild\sphactor.vcxproj]
>
> sphactor.obj : error LNK2019: unresolved external symbol
> __imp_zactor_destroy referenced in function
> sphactor_destroy
> [C:\msys64\home\ECT-Admin\src\libsphactor\msbuild\sphactor.vcxproj]
>
> etc, etc
>
> These are the cmake commands I used to build:
>
> libzmq:
> cmake .. -DWITH_LIBSODIUM=OFF -DBUILD_STATIC=ON -DBUILD_SHARED=ON
> -DCMAKE_INSTALL_PREFIX=C:\tmp
> cmake --build . --config Debug --target=install
> ctest -C Debug -V
>
> czmq:
> cmake .. -DCMAKE_PREFIX_PATH=C:\tmp -DCMAKE_INSTALL_PREFIX=C:\tmp
> cmake --build . --config Debug --target install
> ctest -C Debug -V
>
> then my own project:
> cmake .. -DCMAKE_PREFIX_PATH=C:\tmp -DCMAKE_INSTALL_PREFIX=C:\tmp
> cmake --build . --config Debug --target install
>
> Anybody any clues?
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20200604/847f1845/attachment.htm>


More information about the zeromq-dev mailing list