首页 文章

在交叉编译QNX后,boost文件系统(1.63)失败并出现未定义的引用错误

提问于
浏览
0

我已经交叉编译了QNX的提升,并且所有构建文件都存在于/ home / hari1234 / qnx_cross_compile / src / arm / boost_1_63_0 / build / include和/ home / hari1234 / qnx_cross_compile / src / arm / boost_1_63_0 / build / lib下

我试图从源代码编译ROS,但它失败了

/opt/qnx/install/host/linux/x86_64/usr/bin/arm-unknown-nto-qnx7.0.0eabi-ld:warning:bin.v2 / libs / system / build / qcc-arm / release / target -os-qnx / threading-multi / libboost_system.so.1.63.0,/home/hari1234/qnx_cross_compile/src/arm/boost_1_63_0/build/lib/libboost_filesystem.so所需,未找到(尝试使用-rpath或-rpath -link)/opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so:warning:'tmpnam'函数很危险 . 请改用“mkstemp” . /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so:warning:'tempnam'函数很危险 . 请改用“mkstemp” . /opt/qnx/install/host/linux/x86_64/usr/bin/arm-unknown-nto-qnx7.0.0eabi-ld:warning:bin.v2 / libs / system / build / qcc-arm / release / target- os-qnx / threading-multi / libboost_system.so.1.63.0,/home/hari1234/qnx_cross_compile/src/arm/boost_1_63_0/build/lib/libboost_filesystem.so所需,未找到(尝试使用-rpath或-rpath-链接)/opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so:对boost :: program_options :: validate的未定义引用(boost :: any&,std :: __ 1 :: vector <std :: __ 1: :basic_string <char,std :: __ 1 :: char_traits <char>,std :: __ 1 :: allocator <char >>,std :: __ 1 :: allocator <std :: __ 1 :: basic_string <char,std :: __ 1 :: char_traits <char>,std :: __ 1 :: allocator <char >>>> const&,std :: __ 1 :: basic_string <char,std :: __ 1 :: char_traits <char>,std :: __ 1 :: allocator <char >> *,int)'/ opt / qnx / install / arm_catkin_ros / level_isolated / onpack / lib / libspack.so:undefined reference toboost :: program_options :: abstract_variables_map :: operator [](std :: __ 1 :: basic_string ,std :: __ 1 :: allocator> const&)const' /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so:对boost :: program_options :: options_description :: options_description的未定义引用(std :: __ 1 :: basic_string <char,std :: __ 1 :: char_traits <char>,std :: __ 1 :: allocator <char >> const&,unsigned int,unsigned int)'/ opt / qnx / install / arm_catkin_ros / devel_isolated / onpack / lib / libspack.so:undefined reference toboost :: program_options: :detail :: cmdline :: cmdline(std :: __ 1 :: vector,std :: __ 1 :: allocator>,std :: __ 1 :: allocator,std :: __ 1 :: allocator >>> const&)'/ opt / qnx / install / arm_catkin_ros / devel_isolated / rospack / lib / librospack.so:对boost :: program_options :: to_internal的未定义引用(std :: __ 1 :: basic_string <char,std :: __ 1 :: char_traits <char>,std: :__ 1 :: allocator <char >> const&)'/ opt / qnx / install / arm_catkin_ros / level_isolated / onpack / lib / libspack.so:undefined reference toboost :: program_options :: arg'/ opt / qnx / install / arm_catkin_ros / devel_isolated / rospack / lib / librospack.so:未定义的引用`boost :: program_options :: value_semantic_codecvt_helper :: parse(boost :: any&,std :: __ 1 :: vector,std :: __ 1 :: allocator>,std :: __ 1 :: allocator,std :: __ 1 :: allocator >>> const&,bool )const'cc:/opt/qnx/install/host/linux/x86_64/usr/bin/arm-unknown-nto-qnx7.0.0eabi-ld error 1 CMakeFiles / rospackexe.dir / build.make:106:recipe for目标'/ opt / qnx / install / arm_catkin_ros / devel_isolated / rospack / bin / rospack'失败

该警告表明libboost_filesystem.so会查找找不到的bin.v2 / libs / system / build / qcc-arm / release / target-os-qnx / threading-multi / libboost_system.so.1.63.0 . 我不确定在交叉编译QNX的boost时是否要生成bin.v2文件夹 . 我认为这就是为什么发生了对boost :: filesystem :: validate的未定义引用错误的原因 .

任何指针或帮助将受到高度赞赏

提前致谢

1 回答

  • 0

    通过将boost库编译为静态库而不是动态库,我能够解决这个问题 . 我被告知原始问题必须与设置rpath有关

相关问题