gpt4 book ai didi

c++ - 构建失败错误 : Cannot build C++ SDK Helloworld with qibuild

转载 作者:太空宇宙 更新时间:2023-11-04 12:00:21 25 4
gpt4 key购买 nike

我正在尝试在 Linux 18.04.1 (VirtualBox) 上安装 NaoQI C++ SDK。我遵循了这个安装说明:http://doc.aldebaran.com/2-1/dev/cpp/install_guide.html

我的问题在 E 部分的第 3 步,当我尝试运行“qibuild make”时

我在尝试构建 helloworld 示例时遇到此错误:

CMakeFiles/testhelloworld.dir/testhelloworld.cpp.o: In function main':
/home/nounou/Documents/SDKfolder/naoqi-sdk/doc/dev/cpp/examples/core/helloworld/testhelloworld.cpp:35:
undefined reference to
AL::ALBroker::createBroker(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, int, std::__cxx11::basic_string, std::allocator > const&, int, int, std::__cxx11::basic_string, std::allocator >, bool)' /home/nounou/Documents/SDKfolder/naoqi-sdk/doc/dev/cpp/examples/core/helloworld/testhelloworld.cpp:38: undefined reference to AL::ALProxy::ALProxy(boost::shared_ptr<AL::ALBroker>,
std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, int, int)'
CMakeFiles/testhelloworld.dir/testhelloworld.cpp.o: In function
qi::log::LogStream::~LogStream()':

....

CMakeFiles/testhelloworld.dir/build.make:113: recipe for target 'sdk/bin/testhelloworld' failed make[2]: * [sdk/bin/testhelloworld] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/testhelloworld.dir/all' failed make[1]: * [CMakeFiles/testhelloworld.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2

[ERROR]: BuildFailed Error occurred when building project hello world

如果您对问题出在哪里有任何想法,请帮助我。谢谢!

最佳答案

我在 Fedora 29 上遇到了同样的问题...经过几个小时的搜索,我发现将 set(CMAKE_CXX_FLAGS "-D_GLIBCXX_USE_CXX11_ABI=0") 添加到 CMakeLists.txt 文件中可以解决问题。

我在这里找到了解决方案: gcc using c++11 standard even though 98 explicitly specified

关于c++ - 构建失败错误 : Cannot build C++ SDK Helloworld with qibuild,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52698075/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com