[zeromq-dev] Issues compiling for Windows with Visual C++ 2008

Sam Lishak Sam.Lishak at redbulltechnology.com
Thu Sep 3 16:52:49 CEST 2015


Hi,

I'm trying to compile libzmq for Windows 32-bit using Visual C++ 2008, for use with pyzmq. I'm using the included vs2008 solution. I've encountered a couple of issues, outlined in the comments on this Github issue: https://github.com/zeromq/libzmq/issues/1559

The first issue was as follows:

c:\users\sam.lishak\documents\libzmq-master\include\zmq.h(88) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory

This was solved by replacing lines 75-79 of zmq.h with lines 35-70 of stdint.hpp. However, this led to the second issue, which is a load of unresolved symbol errors:

1>Linking...
1>   Creating library ../../../../lib/libzmq.lib and object ../../../../lib/libzmq.exp
1>raw_decoder.obj : error LNK2019: unresolved external symbol "public: __thiscall zmq::shared_message_memory_allocator::~shared_message_memory_allocator(void)" (??1shared_message_memory_allocator at zmq@@QAE at XZ) referenced in function __unwindfunclet$??0raw_decoder_t at zmq@@QAE at I@Z$0
1>v2_decoder.obj : error LNK2001: unresolved external symbol "public: __thiscall zmq::shared_message_memory_allocator::~shared_message_memory_allocator(void)" (??1shared_message_memory_allocator at zmq@@QAE at XZ)
1>raw_decoder.obj : error LNK2019: unresolved external symbol "public: __thiscall zmq::shared_message_memory_allocator::shared_message_memory_allocator(unsigned int,unsigned int)" (??0shared_message_memory_allocator at zmq@@QAE at II@Z) referenced in function "public: __thiscall zmq::raw_decoder_t::raw_decoder_t(unsigned int)" (??0raw_decoder_t at zmq@@QAE at I@Z)
1>raw_decoder.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall zmq::shared_message_memory_allocator::size(void)const " (?size at shared_message_memory_allocator@zmq@@QBEIXZ) referenced in function "public: virtual void __thiscall zmq::raw_decoder_t::get_buffer(unsigned char * *,unsigned int *)" (?get_buffer at raw_decoder_t@zmq@@UAEXPAPAEPAI at Z)
1>v2_decoder.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall zmq::shared_message_memory_allocator::size(void)const " (?size at shared_message_memory_allocator@zmq@@QBEIXZ)
1>raw_decoder.obj : error LNK2019: unresolved external symbol "public: unsigned char * __thiscall zmq::shared_message_memory_allocator::allocate(void)" (?allocate at shared_message_memory_allocator@zmq@@QAEPAEXZ) referenced in function "public: virtual void __thiscall zmq::raw_decoder_t::get_buffer(unsigned char * *,unsigned int *)" (?get_buffer at raw_decoder_t@zmq@@UAEXPAPAEPAI at Z)
1>v2_decoder.obj : error LNK2001: unresolved external symbol "public: unsigned char * __thiscall zmq::shared_message_memory_allocator::allocate(void)" (?allocate at shared_message_memory_allocator@zmq@@QAEPAEXZ)
1>raw_decoder.obj : error LNK2019: unresolved external symbol "public: unsigned char * __thiscall zmq::shared_message_memory_allocator::release(void)" (?release at shared_message_memory_allocator@zmq@@QAEPAEXZ) referenced in function "public: virtual int __thiscall zmq::raw_decoder_t::decode(unsigned char const *,unsigned int,unsigned int &)" (?decode at raw_decoder_t@zmq@@UAEHPBEIAAI at Z)
1>raw_decoder.obj : error LNK2019: unresolved external symbol "public: static void __cdecl zmq::shared_message_memory_allocator::call_dec_ref(void *,void *)" (?call_dec_ref at shared_message_memory_allocator@zmq@@SAXPAX0 at Z) referenced in function "public: virtual int __thiscall zmq::raw_decoder_t::decode(unsigned char const *,unsigned int,unsigned int &)" (?decode at raw_decoder_t@zmq@@UAEHPBEIAAI at Z)
1>v2_decoder.obj : error LNK2001: unresolved external symbol "public: static void __cdecl zmq::shared_message_memory_allocator::call_dec_ref(void *,void *)" (?call_dec_ref at shared_message_memory_allocator@zmq@@SAXPAX0 at Z)
1>session_base.obj : error LNK2019: unresolved external symbol "public: __thiscall zmq::socks_connecter_t::socks_connecter_t(class zmq::io_thread_t *,class zmq::session_base_t *,struct zmq::options_t const &,struct zmq::address_t *,struct zmq::address_t *,bool)" (??0socks_connecter_t at zmq@@QAE at PAVio_thread_t@1 at PAVsession_base_t@1 at ABUoptions_t@1 at PAUaddress_t@1 at 3_N@Z) referenced in function "private: void __thiscall zmq::session_base_t::start_connecting(bool)" (?start_connecting at session_base_t@zmq@@AAEX_N at Z)
1>socket_base.obj : error LNK2019: unresolved external symbol "public: __thiscall zmq::client_t::client_t(class zmq::ctx_t *,unsigned int,int)" (??0client_t at zmq@@QAE at PAVctx_t@1 at IH@Z) referenced in function "public: static class zmq::socket_base_t * __cdecl zmq::socket_base_t::create(int,class zmq::ctx_t *,unsigned int,int)" (?create at socket_base_t@zmq@@SAPAV12 at HPAVctx_t@2 at IH@Z)
1>socket_base.obj : error LNK2019: unresolved external symbol "public: __thiscall zmq::server_t::server_t(class zmq::ctx_t *,unsigned int,int)" (??0server_t at zmq@@QAE at PAVctx_t@1 at IH@Z) referenced in function "public: static class zmq::socket_base_t * __cdecl zmq::socket_base_t::create(int,class zmq::ctx_t *,unsigned int,int)" (?create at socket_base_t@zmq@@SAPAV12 at HPAVctx_t@2 at IH@Z)
1>socket_base.obj : error LNK2019: unresolved external symbol "public: __thiscall zmq::mailbox_safe_t::mailbox_safe_t(class zmq::mutex_t *)" (??0mailbox_safe_t at zmq@@QAE at PAVmutex_t@1@@Z) referenced in function "protected: __thiscall zmq::socket_base_t::socket_base_t(class zmq::ctx_t *,unsigned int,int,bool)" (??0socket_base_t at zmq@@IAE at PAVctx_t@1 at IH_N@Z)
1>socket_base.obj : error LNK2019: unresolved external symbol "public: void __thiscall zmq::mailbox_safe_t::add_signaler(class zmq::signaler_t *)" (?add_signaler at mailbox_safe_t@zmq@@QAEXPAVsignaler_t at 2@@Z) referenced in function "public: int __thiscall zmq::socket_base_t::add_signaler(class zmq::signaler_t *)" (?add_signaler at socket_base_t@zmq@@QAEHPAVsignaler_t at 2@@Z)
1>socket_base.obj : error LNK2019: unresolved external symbol "public: void __thiscall zmq::mailbox_safe_t::remove_signaler(class zmq::signaler_t *)" (?remove_signaler at mailbox_safe_t@zmq@@QAEXPAVsignaler_t at 2@@Z) referenced in function "public: int __thiscall zmq::socket_base_t::remove_signaler(class zmq::signaler_t *)" (?remove_signaler at socket_base_t@zmq@@QAEHPAVsignaler_t at 2@@Z)
1>v2_decoder.obj : error LNK2019: unresolved external symbol "public: __thiscall zmq::shared_message_memory_allocator::shared_message_memory_allocator(unsigned int)" (??0shared_message_memory_allocator at zmq@@QAE at I@Z) referenced in function "public: __thiscall zmq::v2_decoder_t::v2_decoder_t(unsigned int,__int64)" (??0v2_decoder_t at zmq@@QAE at I_J@Z)
1>v2_decoder.obj : error LNK2019: unresolved external symbol "public: void __thiscall zmq::shared_message_memory_allocator::inc_ref(void)" (?inc_ref at shared_message_memory_allocator@zmq@@QAEXXZ) referenced in function "private: int __thiscall zmq::v2_decoder_t::size_ready(unsigned __int64,unsigned char const *)" (?size_ready at v2_decoder_t@zmq@@AAEH_KPBE at Z)
1>v2_decoder.obj : error LNK2019: unresolved external symbol "public: unsigned char * __thiscall zmq::shared_message_memory_allocator::data(void)" (?data at shared_message_memory_allocator@zmq@@QAEPAEXZ) referenced in function "private: int __thiscall zmq::v2_decoder_t::size_ready(unsigned __int64,unsigned char const *)" (?size_ready at v2_decoder_t@zmq@@AAEH_KPBE at Z)
1>v2_decoder.obj : error LNK2019: unresolved external symbol "public: void __thiscall zmq::shared_message_memory_allocator::deallocate(void)" (?deallocate at shared_message_memory_allocator@zmq@@QAEXXZ) referenced in function "public: virtual __thiscall zmq::decoder_base_t<class zmq::v2_decoder_t,class zmq::shared_message_memory_allocator>::~decoder_base_t<class zmq::v2_decoder_t,class zmq::shared_message_memory_allocator>(void)" (??1?$decoder_base_t at Vv2_decoder_t@zmq@@Vshared_message_memory_allocator at 2@@zmq@@UAE at XZ)
1>../../../../lib/libzmq.dll : fatal error LNK1120: 16 unresolved externals

I'm not sure how to proceed with this. Any help would be greatly appreciated.

Cheers,


Sam


Sam Lishak
Simulation & Modelling Engineer

T: 01908279709
E: sam.lishak at redbulltechnology.com<mailto:sam.lishak at redbulltechnology.com>
Red Bull Technology
Building 1, Bradbourne Drive
Tilbrook, Milton Keynes, UK
MK7 8BJ
[http://paddock/_layouts/images/email_signature.jpg]<http://www.infiniti-redbullracing.com/>
Red Bull Technology Limited is a company registered in England and Wales under number 05202976 and whose registered office is Building 1, Bradbourne Drive, Tilbrook, Milton Keynes, MK7 8BJ Please note, Red Bull Technology Limited only enter into contracts with suppliers based on Red Bull Technology Terms and Conditions of Purchase, copies of which are available on request.This e-mail is confidential and may contain valuable information. If you are not the intended recipient, you should not copy it, re-transmit it, use it or disclose its contents, but should return it to the sender immediately and delete your copy from your system.


______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150903/5f960a54/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 53352 bytes
Desc: image001.jpg
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150903/5f960a54/attachment.jpg>


More information about the zeromq-dev mailing list