我想用zeroMQ在我的項目 我運行如下的配置來構建libaray到我的主文件夾如何建立一個項目(比如zeromq)的靜態庫,並將其鏈接到我的項目
./configure --enable-static --disable-shared --prefix=/home/xx/out
然後我通過
gcc -o myproject x.c y.c /home/xx/out/libzmq.a
鏈接到我的項目,但仍有像很多鏈接錯誤如下:
../zmq/lib/libzmq.a(libzmq_la-ip.o): In function zmq::resolve_ip_interface(sockaddr_storage*, unsigned int*, char const*)':
/home/sureone/share/zeromq-2.2.0/src/ip.cpp:221: undefined reference to std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
/home/sureone/share/zeromq-2.2.0/src/ip.cpp:222: undefined reference to std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
../zmq/lib/libzmq.a(libzmq_la-ip.o): In function zmq::resolve_ip_hostname(sockaddr_storage*, unsigned int*, char const*)':
/home/sureone/share/zeromq-2.2.0/src/ip.cpp:314: undefined reference to std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, uns
...........
你會意識到,ØMQ是LGPL,對不對? – 2012-04-23 01:02:00
LGPL與靜態鏈接異常http://www.zeromq.org/area:licensing – g19fanatic 2012-09-07 13:50:51