Ich versuche, die statische Bibliothek von ZeroMQ in Visual Studio 2015 zu verwenden. Ich generierte es durch Klonen der git repository, Ändern der windows.hpp enthalten in fd.hpp von #include <windows.hpp>
bis #include "windows.hpp"
, Setzen Sie Libsodium an die richtige Stelle und bauen Sie dann alles in der vs2015-Lösung auf.Visual Studio 2015 Community ZeroMQ statische Bibliothek Verknüpfung Fehler
Im Programm Ich versuche ZeroMQ zu verwenden, in den I ZeroMQ include enthalten, enthalten die ZeroMQ Release statische Verzeichnis (libzmq \ bin \ win32 \ Release \ statischen v140 \) als zusätzliche Abhängigkeit hinzugefügt libzqm.lib, ich habe ZMQ_STATIC und _CRT_SECURE_NO_WARNINGS für einige andere Dinge, die ich in meinem Programm mache, definiert und die Laufzeitbibliothek in Multi-threaded/MT geändert.
Wenn ich versuche, an dieser Stelle zu kompilieren bekomme ich diese Fehler:
1>------ Build started: Project: HttpServer, Configuration: Release Win32 ------
1> main.cpp
1>libzmq.lib(zmq.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(socket_poller.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(select.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(zmq.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(socket_poller.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(select.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(signaler.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(zmq.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(zmq.obj) : error LNK2001: unresolved external symbol __imp__WSACleanu[email protected]
1>libzmq.lib(socks_connecter.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(udp_engine.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp_listener.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(ip.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp_connecter.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(zmq.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(err.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(socket_poller.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(signaler.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp_address.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(signaler.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(udp_engine.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp_address.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(signaler.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(udp_address.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(stream_engine.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp_address.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(stream_engine.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(udp_engine.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp_address.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp_address.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(socks.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp_address.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(socks.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp_address.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(ip.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp_address.obj) : error LNK2001: unresolved external symbol _in6addr_any
1>libzmq.lib(select.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(signaler.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp_listener.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(select.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp_connecter.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(socks_connecter.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(select.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(select.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(select.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(select.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(signaler.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp_listener.obj) : error LNK2001: unresolved external symbol __imp__[email protected]
1>libzmq.lib(udp_engine.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(signaler.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp_listener.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp_connecter.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(socks_connecter.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(socks_connecter.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(udp_engine.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(signaler.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp_listener.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(stream_engine.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp_connecter.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(signaler.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp_connecter.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(socks_connecter.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(signaler.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp_listener.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(signaler.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(signaler.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(udp_engine.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(signaler.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp_listener.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(ip.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(udp_address.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(udp_engine.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(ip.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(ip.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(ip.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(tcp.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(udp_engine.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(udp_engine.obj) : error LNK2001: unresolved external symbol [email protected]
1>libzmq.lib(udp_engine.obj) : error LNK2001: unresolved external symbol [email protected]
1>H:\Programming\c++\HttpServer\Release\HttpServer.exe : fatal error LNK1120: 35 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Was mich verwirrt ist, dass, wenn ich schließen die ZeroMQ Release dynamische Verzeichnis (libzmq \ bin \ win32 \ Release \ v140 \ dynamisch) , die die dll enthält, kompiliert es gut. Wenn ich versuche, mein Programm auszuführen, erfordert es jedoch, dass die DLL ausgeführt wird. Dies versuche ich mit der statischen Bibliothek von ZeroMQ zu vermeiden. Ich weiß nicht, was ich jetzt tun soll.
EDIT
Ich glaube nicht, meine Frage an this verwandt ist, weil es mir scheint, dass die statische Lib Sachen in der DLL verweist, was bedeutet, dass ich meine die DLL enthalten müssen mit Programm, bedeutet das nicht, dass ich die Bibliothek nicht wirklich statisch verknüpfe? War jemand in der Lage, ZeroMQ unter Windows zu verwenden, ohne eine DLL zu benötigen?
Mögliche Duplikat [Was ist ein nicht definierter Referenz/nicht aufgelöstes externes Symbol Fehler und wie Ich repariere es?] (Http://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – IInspectable
kann nicht verlinken ihre Implementierung in '.lib' Dateien. –