Reputation: 5316
I am trying to build zeromq under Windows 7 (x64) with cygwin (x64) and gcc(x86_64)>=4.
configure works but the make step crashes when it reaches curve_keygen.exe
Making all in tools
make[1]: Entering directory '/e/0MQ/zeromq-4.0.3/tools'
CC curve_keygen.o
CCLD curve_keygen.exe
../src/.libs/libzmq.a(libzmq_la-zmq.o):zmq.cpp:(.data+0x0): undefined reference to `__gxx_personality_seh0'
../src/.libs/libzmq.a(libzmq_la-zmq.o):zmq.cpp:(.xdata+0x30): undefined reference to `__gxx_personality_seh0'
../src/.libs/libzmq.a(libzmq_la-zmq.o):zmq.cpp:(.xdata+0x30): relocation truncated to fit: rva32 against undefined symbol `__gxx_personality_seh0'
../src/.libs/libzmq.a(libzmq_la-zmq.o):zmq.cpp:(.xdata+0x1c0): undefined reference to `__gxx_personality_seh0'
../src/.libs/libzmq.a(libzmq_la-zmq.o):zmq.cpp:(.xdata+0x1c0): relocation truncated to fit: rva32 against undefined symbol `__gxx_personality_seh0'
../src/.libs/libzmq.a(libzmq_la-zmq.o):zmq.cpp:(.rdata$.refptr._ZSt7nothrow[.refptr._ZSt7nothrow]+0x0): undefined reference to `std::nothrow'
../src/.libs/libzmq.a(libzmq_la-socket_base.o): In function `zmq::socket_base_t::parse_uri(char const*, std::string&, std::string&)':
.
.
.
collect2: error: ld returned 1 exit status
Makefile:394: recipe for target 'curve_keygen.exe' failed
make[1]: *** [curve_keygen.exe] Error 1
make[1]: Leaving directory '/e/0MQ/zeromq-4.0.3/tools'
Makefile:412: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
What do I need to do to build zeromq under windows with cygwin.
Upvotes: 2
Views: 2714
Reputation: 827
This indicates that libzmq.la
is a C++ library, not a C library. Not sure why that is (it shouldn't) but here is a workaround:
mv tools/curve_keygen.c tools/curve_keygen.cpp
sed -i 's/\.c\>/&pp/' tools/Makefile.am
rm -f tools/.deps/curve_keygen.Po
./autogen.sh
make
This will compile curve_keygen.exe
, but does not solve the question of why libzmq.la
has C++ dependencies under Cygwin.
Upvotes: 3