【问题标题】:How to build zeromq on windows with cygwin?如何使用 cygwin 在 Windows 上构建 zeromq?
【发布时间】:2014-01-09 10:15:29
【问题描述】:

我正在尝试使用 cygwin (x64) 和 gcc(x86_64)>=4 在 Windows 7 (x64) 下构建 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

windows下用cygwin搭建zeromq需要做什么。

【问题讨论】:

    标签: build makefile cygwin zeromq


    【解决方案1】:

    这表明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++依赖的问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-11-14
      • 2013-02-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多