2015-10-22 1 views
1

Je suis en train de compiler les sources de ZeroMQ et je l'erreur suivante:-je obtenir LNK2019 d'erreur lorsque je tente de compiler zeromq sources

J'utilise Visual Studio 2013 mise à jour 4/Windows 7 x64

Tout d'abord, je compile la bibliothèque libsodium de façon satisfaisante.

Ensuite, je lier le chemin du répertoire des fichiers d'en-tête de libsodium à des dépendances supplémentaires et libsodium.lib à des répertoires de bibliothèque supplémentaires. Je spécifie également le nom de la bibliothèque dans les dépendances supplémentaires.

J'essaye de le compiler sous l'architecture win32 et l'architecture x64 mais j'ai les mêmes erreurs.

Je sais qu'un préfixe __imp est utilisé comme un pont vers la fonction que je veux utiliser, donc si j'ai lié les bibliothèques de manière appropriée, pourquoi ai-je cette erreur?

journal de la console:

1>Creating library E:\zmq\libzmq\builds\msvc\vs2013\libzmq\..\..\..\..\bin\Win32\Debug\v120\dynamic\libzmq.lib and object E:\zmq\libzmq\builds\msvc\vs2013\libzmq\..\..\..\..\bin\Win32\Debug\v120\dynamic\libzmq.exp 
1>ctx.obj : error LNK2019: unresolved external symbol __imp__randombytes_close referenced in function "public: __thiscall zmq::ctx_t::~ctx_t(void)" ([email protected]@@[email protected]) 
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__sodium_init referenced in function "public: __thiscall zmq::curve_client_t::curve_client_t(struct zmq::options_t const &)" ([email protected]@@[email protected][email protected]@@Z) 
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__sodium_init 
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__crypto_box_keypair referenced in function "public: __thiscall zmq::curve_client_t::curve_client_t(struct zmq::options_t const &)" ([email protected]@@[email protected][email protected]@@Z) 
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__crypto_box_keypair 
1>zmq_utils.obj : error LNK2001: unresolved external symbol __imp__crypto_box_keypair 
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__crypto_box_beforenm referenced in function "private: int __thiscall zmq::curve_client_t::process_welcome(unsigned char const *,unsigned int)" ([email protected][email protected]@@[email protected]) 
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__crypto_box_beforenm 
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__crypto_box referenced in function "private: int __thiscall zmq::curve_client_t::produce_hello(class zmq::msg_t *)" ([email protected][email protected]@@[email protected]@@Z) 
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__crypto_box 
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__crypto_box_open referenced in function "private: int __thiscall zmq::curve_client_t::process_welcome(unsigned char const *,unsigned int)" ([email protected][email protected]@@[email protected]) 
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__crypto_box_open 
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__crypto_box_afternm referenced in function "public: virtual int __thiscall zmq::curve_client_t::encode(class zmq::msg_t *)" ([email protected][email protected]@@U[email protected]@@Z) 
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__crypto_box_afternm 
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__crypto_box_open_afternm referenced in function "public: virtual int __thiscall zmq::curve_client_t::decode(class zmq::msg_t *)" ([email protected][email protected]@@[email protected]@@Z) 
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__crypto_box_open_afternm 
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__randombytes referenced in function "private: int __thiscall zmq::curve_client_t::produce_initiate(class zmq::msg_t *)" ([email protected][email protected]@@[email protected]@@Z) 
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__randombytes 
1>curve_server.obj : error LNK2019: unresolved external symbol __imp__crypto_secretbox referenced in function "private: int __thiscall zmq::curve_server_t::produce_welcome(class zmq::msg_t *)" ([email protected][email protected]@@[email protected]@@Z) 
1>curve_server.obj : error LNK2019: unresolved external symbol __imp__crypto_secretbox_open referenced in function "private: int __thiscall zmq::curve_server_t::process_initiate(class zmq::msg_t *)" ([email protected][email protected]@@[email protected]@@Z) 

Merci à l'avance.

Répondre

0

Vous compilez probablement libsodium d'une manière statique. Essayez de le compiler dinamiquement et reliez-le à nouveau.

0

De telles erreurs peuvent également se produire lorsque vous avez défini une mauvaise convention d'appel sur votre projet.