我试图在Visual Studio 2015中使用ZeroMQ的静态库.我通过克隆git存储库生成它,将fd.hpp中的windows.hpp include更改#include <windows.hpp>为#include "windows.hpp",将libsodium放在正确的位置,然后批量构建所有内容vs2015解决方案.
在程序中我试图使用ZeroMQ,我包括ZeroMQ包含目录,包括ZeroMQ发布静态目录(libzmq\bin\Win32\Release\v140\static),添加了libzqm.lib作为附加依赖项,定义了ZMQ_STATIC和_CRT_SECURE_NO_WARNINGS对于我在程序中执行的其他一些操作,并将运行时库更改为多线程/ MT.
当我在这一点上尝试编译时,我得到以下错误:
1>------ Build started: Project: HttpServer, Configuration: Release Win32 ------
1> main.cpp
1>libzmq.lib(zmq.obj) : error LNK2001: unresolved external symbol ___WSAFDIsSet@8
1>libzmq.lib(socket_poller.obj) : error LNK2001: unresolved external symbol ___WSAFDIsSet@8
1>libzmq.lib(select.obj) : error LNK2001: unresolved external symbol ___WSAFDIsSet@8
1>libzmq.lib(zmq.obj) : error LNK2001: unresolved external symbol __imp__select@20
1>libzmq.lib(socket_poller.obj) : error LNK2001: unresolved external symbol __imp__select@20
1>libzmq.lib(select.obj) : error LNK2001: unresolved external symbol __imp__select@20
1>libzmq.lib(signaler.obj) : error LNK2001: unresolved external …Run Code Online (Sandbox Code Playgroud) c++ static-libraries zeromq static-linking visual-studio-2015