我正在尝试使用Cygwin构建一个使用boost库的应用程序,然后再将其部署在Linux机器上。我下载了最新版本的boost,1.46.1,然后按照http://www.boost.org/doc/libs/1_46_1/more/getting_started/unix-variants.html中的说明进行操作。
我已经完成了bootstrap和bjam进程。当我检查stage / lib文件夹时,创建了.dll,.dll.a,.a文件。这些包含库是否需要?我希望有.so文件,因为它将在linux上运行,但不幸的是.dll是创建的。
顺便说一下,我正在使用Eclipse IDE和我的项目。
这是我的测试项目,
#include <boost/asio.hpp>
#include <boost/bind.hpp>
int main(void)
{
return 0;
}
编译后,我收到链接错误:
Invoking: GCC C++ Linker
/opt/Mx800SDK/vfitc/cross/bin/arm-linux-g++ -L../lib -o'boostTest' ./boostTest.o ./include/boost/fusion/include/adapt_adt_named.o -lpthread -lboost_system -lstdc++
./boostTest.o(.text+0x498): In function `__static_initialization_and_destruction_0(int, int)':
: undefined reference to `boost::system::system_category()'
./boostTest.o(.text+0x4b0): In function `__static_initialization_and_destruction_0(int, int)':
: undefined reference to `boost::system::system_category()'
./boostTest.o(.text+0x4c8): In function `__static_initialization_and_destruction_0(int, int)':
: undefined reference to `boost::system::generic_category()'
./boostTest.o(.text+0x4e0): In function `__static_initialization_and_destruction_0(int, int)':
: undefined reference to `boost::system::generic_category()'
./boostTest.o(.gnu.linkonce.t._ZN5boost4asio6detail20posix_tss_ptr_createERj+0x60): In function `boost::asio::detail::posix_tss_ptr_create(unsigned int&)':
: undefined reference to `boost::system::system_category()'
如何解决这个问题的任何帮助都将非常感激。
由于