2014-01-09 57 views
2

我想在Windows 7(x64)下用cygwin(x64)和gcc(x86_64)> = 4構建zeromq。如何使用cygwin在Windows上構建zeromq?

配置的作品,但make步驟的崩潰,當它到達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 

什麼我需要繼續努力來建立zeromq與Cygwin的窗戶下。

回答

3

這表明libzmq.la是一個C++庫,而不是C庫。不知道這是爲什麼(它不應該),但這裏是一個解決辦法:

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 

這將編譯curve_keygen.exe,但並沒有解決爲什麼libzmq.la有在Cygwin下C++依賴的問題。

相關問題