开发者

Cross building boost from Cygwin to arm-linux

开发者 https://www.devze.com 2023-03-18 02:22 出处:网络
I\'m trying to build an app that uses boost libraries with Cygwin then later on deploy it on Linux box . I downloaded the latest version of boost, 1.46.1 then followed the instructions here http://www

I'm trying to build an app that uses boost libraries with Cygwin then later on deploy it on Linux box . I downloaded the latest version of boost, 1.46.1 then followed the instructions here http://www.boost.org/doc/libs/1_46_1/more/getting_started/unix-variants.html.

I'm done with bootstrap and bjam process. When I checked on the stage/lib folder, there are .dll, .dll.a, .a files created. Is these the include libraries needed? I'am expecting to have .so files since it will run on linux but unfortunately .dll's are created.

BTW, I'm using Eclipse IDE with my project.

Here is my test project,

#include <boost/asio.hpp>
#include <boost/bind.hpp>

int main(void) 
{
return 0; 
}  

After compiling, i got linking error:

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 开发者_如何学JAVAfunction `__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()'

Any help on how can fix this would be very much appreciated.

Thanks


You are trying to cross build for linux-arm, you shall not follow the cygwin instruction. Do the cross building instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消