gpt4 book ai didi

c++11 - Centos7 和 devtoolset-7 下对 std::__sso_string::__sso_string 的 undefined reference

转载 作者:行者123 更新时间:2023-12-01 01:48:08 27 4
gpt4 key购买 nike

我有安装了 devtoolset-7 (gcc/g++ 7.2.1) 的 Centos 7(CentOS Linux 版本 7.4.1708(核心)),我正在尝试使用 conan 和 cmake 在 Debug模式下构建应用程序:

cmake .. -DCMAKE_BUILD_TYPE=Debug && make

编译没问题,但是当它尝试链接应用程序时,出现错误:
[ 94%] Building CXX object test/CMakeFiles/tests.dir/main.cpp.o
cd /home/mmaka/Projekty/Test/build/test && /opt/rh/devtoolset-7/root/usr/bin/c++ -I/home/mmaka/.conan/data/Catch/1.9.4/uilianries/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include -I/home/mmaka/.conan/data/LicenseVerifier/0.2/mmaka/stable/package/dddbe98cdf0fee1bc0e935b7d9cb55fb6ac91e9d/include -I/home/mmaka/.conan/data/Protobuf/3.3.0/memsharded/testing/package/af539cf88d500e43f07db880ead85caf03eb59f0/include -I/home/mmaka/.conan/data/armadillo/7.950.1/mmaka/stable/package/4738f25476b0f8f9c35b9ffa2ef93fc44ee1be3f/include -I/home/mmaka/.conan/data/civetweb/1.9.1/mmaka/stable/package/30521fa001812a885c3d40af3906c4b0ac52ba13/include -I/home/mmaka/.conan/data/jsoncpp/1.8.0/theirix/stable/package/4d157107cadad2bf785efc05e6135855814d60b0/include -I/home/mmaka/.conan/data/sndfile/1.0.28/mmaka/stable/package/3fc343d7c666aa132d336764f97b890ecc35ebaa/include -I/home/mmaka/.conan/data/soxr/0.1.2/mmaka/stable/package/f5439539398d3f0d2ead69e27fe93b1fc9c27772/include -I/home/mmaka/.conan/data/yaml-cpp/0.5.3/mmaka/stable/package/6a58f30b01a1a6b64beeccaddc7d285c7005ead0/include -I/home/mmaka/.conan/data/Boost/1.64.0/conan/stable/package/d6a3c401aaf63728d6c3923f0431fc81dc9c77d1/include -I/home/mmaka/.conan/data/FLAC/1.3.1/Outurnate/stable/package/b90c1b060ffc91d076415439aaf03a44b60edd18/include -I/home/mmaka/.conan/data/Logging/0.1/mmaka/stable/package/4d157107cadad2bf785efc05e6135855814d60b0/include -I/home/mmaka/.conan/data/OpenBLAS/0.2.19/mmaka/stable/package/6c3feb804f9f9215b3dcb50ece3a2a312634ba12/include -I/home/mmaka/.conan/data/cryptopp/5.6.5/hykersec/testing/package/2aefc0b964f0d251f8fb69f3a8450427b24224ea/include -I/home/mmaka/.conan/data/sigar/1.6.4/mmaka/stable/package/510b4fc3cf7267f3694200560a1a888c3f06acb2/include -I/home/mmaka/.conan/data/vorbis/1.3.5/Outurnate/stable/package/fb782e536e79ff49249495e9ac27db7dc508bde3/include -I/home/mmaka/.conan/data/bzip2/1.0.6/conan/stable/package/181529a9eea3709e521af1bd56b4985e73cf35fa/include -I/home/mmaka/.conan/data/ogg/1.3.2/coding3d/stable/package/181529a9eea3709e521af1bd56b4985e73cf35fa/include -I/home/mmaka/.conan/data/zlib/1.2.11/lasote/stable/package/af29216216700781418277965556f3bb047c2635/include -I/home/mmaka/Projekty/Test/common -I/home/mmaka/Projekty/Test/App -I/home/mmaka/Projekty/Test/App/include -I/home/mmaka/Projekty/Test/App/Utilities -I/home/mmaka/Projekty/Test/App/../SessionManager/FileManager -I/home/mmaka/Projekty/Test/build/App-I/home/mmaka/Projekty/Test/rest -I/home/mmaka/Projekty/Test/test -g -DBOOST_USE_STATIC_LIBS -DARMA_USE_CXX11 -DARMA_USE_BLAS -DARMA_DONT_USE_WRAPPER -std=gnu++14 -o CMakeFiles/tests.dir/main.cpp.o -c /home/mmaka/Projekty/Test/test/main.cpp
[ 95%] Linking CXX executable ../bin/tests
cd /home/mmaka/Projekty/Test/build/test && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/tests.dir/link.txt --verbose=1
/opt/rh/devtoolset-7/root/usr/bin/c++ -g CMakeFiles/tests.dir/main.cpp.o CMakeFiles/tests.dir/test_yaml_configuration.cpp.o CMakeFiles/tests.dir/test_filters.cpp.o CMakeFiles/tests.dir/test_algorithm_stop_condition_checker.cpp.o CMakeFiles/tests.dir/test_gauss_adaptation.cpp.o CMakeFiles/tests.dir/test_gauss_probability.cpp.o CMakeFiles/tests.dir/rest/test_multipart_builder.cpp.o CMakeFiles/tests.dir/rest/test_multipart_parser.cpp.o -o ../bin/tests -L/home/mmaka/.conan/data/LicenseVerifier/0.2/mmaka/stable/package/dddbe98cdf0fee1bc0e935b7d9cb55fb6ac91e9d/lib -L/home/mmaka/.conan/data/Protobuf/3.3.0/memsharded/testing/package/af539cf88d500e43f07db880ead85caf03eb59f0/lib -L/home/mmaka/.conan/data/civetweb/1.9.1/mmaka/stable/package/30521fa001812a885c3d40af3906c4b0ac52ba13/lib -L/home/mmaka/.conan/data/jsoncpp/1.8.0/theirix/stable/package/4d157107cadad2bf785efc05e6135855814d60b0/lib -L/home/mmaka/.conan/data/sndfile/1.0.28/mmaka/stable/package/3fc343d7c666aa132d336764f97b890ecc35ebaa/lib -L/home/mmaka/.conan/data/soxr/0.1.2/mmaka/stable/package/f5439539398d3f0d2ead69e27fe93b1fc9c27772/lib -L/home/mmaka/.conan/data/yaml-cpp/0.5.3/mmaka/stable/package/6a58f30b01a1a6b64beeccaddc7d285c7005ead0/lib -L/home/mmaka/.conan/data/Boost/1.64.0/conan/stable/package/d6a3c401aaf63728d6c3923f0431fc81dc9c77d1/lib -L/home/mmaka/.conan/data/FLAC/1.3.1/Outurnate/stable/package/b90c1b060ffc91d076415439aaf03a44b60edd18/lib -L/home/mmaka/.conan/data/Logging/0.1/mmaka/stable/package/4d157107cadad2bf785efc05e6135855814d60b0/lib -L/home/mmaka/.conan/data/OpenBLAS/0.2.19/mmaka/stable/package/6c3feb804f9f9215b3dcb50ece3a2a312634ba12/lib -L/home/mmaka/.conan/data/cryptopp/5.6.5/hykersec/testing/package/2aefc0b964f0d251f8fb69f3a8450427b24224ea/lib -L/home/mmaka/.conan/data/sigar/1.6.4/mmaka/stable/package/510b4fc3cf7267f3694200560a1a888c3f06acb2/lib -L/home/mmaka/.conan/data/vorbis/1.3.5/Outurnate/stable/package/fb782e536e79ff49249495e9ac27db7dc508bde3/lib -L/home/mmaka/.conan/data/bzip2/1.0.6/conan/stable/package/181529a9eea3709e521af1bd56b4985e73cf35fa/lib -L/home/mmaka/.conan/data/ogg/1.3.2/coding3d/stable/package/181529a9eea3709e521af1bd56b4985e73cf35fa/lib -L/home/mmaka/.conan/data/zlib/1.2.11/lasote/stable/package/af29216216700781418277965556f3bb047c2635/lib -Wl,-rpath,/home/mmaka/.conan/data/LicenseVerifier/0.2/mmaka/stable/package/dddbe98cdf0fee1bc0e935b7d9cb55fb6ac91e9d/lib:/home/mmaka/.conan/data/Protobuf/3.3.0/memsharded/testing/package/af539cf88d500e43f07db880ead85caf03eb59f0/lib:/home/mmaka/.conan/data/civetweb/1.9.1/mmaka/stable/package/30521fa001812a885c3d40af3906c4b0ac52ba13/lib:/home/mmaka/.conan/data/jsoncpp/1.8.0/theirix/stable/package/4d157107cadad2bf785efc05e6135855814d60b0/lib:/home/mmaka/.conan/data/sndfile/1.0.28/mmaka/stable/package/3fc343d7c666aa132d336764f97b890ecc35ebaa/lib:/home/mmaka/.conan/data/soxr/0.1.2/mmaka/stable/package/f5439539398d3f0d2ead69e27fe93b1fc9c27772/lib:/home/mmaka/.conan/data/yaml-cpp/0.5.3/mmaka/stable/package/6a58f30b01a1a6b64beeccaddc7d285c7005ead0/lib:/home/mmaka/.conan/data/Boost/1.64.0/conan/stable/package/d6a3c401aaf63728d6c3923f0431fc81dc9c77d1/lib:/home/mmaka/.conan/data/FLAC/1.3.1/Outurnate/stable/package/b90c1b060ffc91d076415439aaf03a44b60edd18/lib:/home/mmaka/.conan/data/Logging/0.1/mmaka/stable/package/4d157107cadad2bf785efc05e6135855814d60b0/lib:/home/mmaka/.conan/data/OpenBLAS/0.2.19/mmaka/stable/package/6c3feb804f9f9215b3dcb50ece3a2a312634ba12/lib:/home/mmaka/.conan/data/cryptopp/5.6.5/hykersec/testing/package/2aefc0b964f0d251f8fb69f3a8450427b24224ea/lib:/home/mmaka/.conan/data/sigar/1.6.4/mmaka/stable/package/510b4fc3cf7267f3694200560a1a888c3f06acb2/lib:/home/mmaka/.conan/data/vorbis/1.3.5/Outurnate/stable/package/fb782e536e79ff49249495e9ac27db7dc508bde3/lib:/home/mmaka/.conan/data/bzip2/1.0.6/conan/stable/package/181529a9eea3709e521af1bd56b4985e73cf35fa/lib:/home/mmaka/.conan/data/ogg/1.3.2/coding3d/stable/package/181529a9eea3709e521af1bd56b4985e73cf35fa/lib:/home/mmaka/.conan/data/zlib/1.2.11/lasote/stable/package/af29216216700781418277965556f3bb047c2635/lib ../App/libApp.a ../rest/libmmaka-Test-lib.a ../common/libcommon-app-lib.a -lLicensing -lpthread -lprotobuf -lcivetweb -lcivetweb-cxx -lrt -ljsoncpp -lsndfile -lsoxr -lyaml-cpp -lboost_atomic -lboost_system -lboost_chrono -lboost_container -lboost_context -lboost_exception -lboost_date_time -lboost_coroutine -lboost_thread -lboost_fiber -lboost_filesystem -lboost_regex -lboost_iostreams -lboost_graph -lboost_locale -lboost_log -lboost_timer -lboost_log_setup -lboost_math_tr1 -lboost_math_tr1f -lboost_math_tr1l -lboost_math_c99 -lboost_math_c99f -lboost_math_c99l -lboost_unit_test_framework -lboost_random -lboost_program_options -lboost_serialization -lboost_wserialization -lboost_signals -lboost_prg_exec_monitor -lboost_test_exec_monitor -lboost_type_erasure -lboost_wave -lFLAC -lFLAC++ -lLogging -lopenblas -lgfortran -Wl,-Bstatic -lcryptopp -Wl,-Bdynamic -lsigar-amd64-linux -ldl -lvorbis -lvorbisfile -lvorbisenc -lbz2 -logg -lz ../App/libApp.a -lLicensing -lpthread -lprotobuf -lcivetweb -lcivetweb-cxx -lrt -ljsoncpp -lsndfile -lsoxr -lyaml-cpp -lboost_atomic -lboost_system -lboost_chrono -lboost_container -lboost_context -lboost_exception -lboost_date_time -lboost_coroutine -lboost_thread -lboost_fiber -lboost_filesystem -lboost_regex -lboost_iostreams -lboost_graph -lboost_locale -lboost_log -lboost_timer -lboost_log_setup -lboost_math_tr1 -lboost_math_tr1f -lboost_math_tr1l -lboost_math_c99 -lboost_math_c99f -lboost_math_c99l -lboost_unit_test_framework -lboost_random -lboost_program_options -lboost_serialization -lboost_wserialization -lboost_signals -lboost_prg_exec_monitor -lboost_test_exec_monitor -lboost_type_erasure -lboost_wave -lFLAC -lFLAC++ -lLogging -lopenblas -lgfortran -Wl,-Bstatic -lcryptopp -Wl,-Bdynamic -lsigar-amd64-linux -ldl -lvorbis -lvorbisfile -lvorbisenc -lbz2 -logg -lz
/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/libstdc++_nonshared.a(cow-stdexcept.o): In function `std::__sso_string::__sso_string(std::string const&)':
(.text._ZNSt12__sso_stringC2ERKSs+0x8): undefined reference to `std::__sso_string::__sso_string(char const*, unsigned long)'
/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/libstdc++_nonshared.a(cow-stdexcept.o): In function `std::_V2::error_category::_M_message(int) const':
(.text._ZNKSt3_V214error_category10_M_messageEi+0x30): undefined reference to `std::__sso_string::__sso_string(char const*, unsigned long)'
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: ../bin/tests: hidden symbol `_ZNSt12__sso_stringD1Ev' isn't defined
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
make[3]: *** [test/CMakeFiles/tests.dir/build.make:284: bin/tests] Error 1
make[3]: Leaving directory '/home/mmaka/Projekty/Test/build'
make[2]: *** [CMakeFiles/Makefile2:350: test/CMakeFiles/tests.dir/all] Error 2
make[2]: Leaving directory '/home/mmaka/Projekty/Test/build'
make[1]: *** [CMakeFiles/Makefile2:362: test/CMakeFiles/tests.dir/rule] Error 2
make[1]: Leaving directory '/home/mmaka/Projekty/Test/build'
make: *** [Makefile:197: tests] Error 2

使用 c++filt,它说符号 'std::__sso_string::~__sso_string()' 没有定义。

有谁知道如何解决这个问题? Release模式运行良好

最佳答案

这是一个错误 - 参见 redhat 的 bugzilla #1519073

关于c++11 - Centos7 和 devtoolset-7 下对 std::__sso_string::__sso_string 的 undefined reference ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47029590/

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