7/8/2023 0 Comments Cmake boost asio![]() usr/include/boost/system/error_code.hpp:706:(.text$_ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei+0xab): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `boost::system::generic_category()' usr/include/boost/system/error_code.hpp:706: undefined reference to `boost::system::generic_category()' usr/include/boost/system/error_code.hpp:679:(.text$_ZNK5boost6system14error_category12std_category10equivalentEiRKSt15error_condition+0xe4): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `boost::system::generic_category()'ĬMakeFiles/play.dir/: In function `boost::system::error_category::std_category::equivalent(std::error_code const&, int) const': usr/include/boost/system/error_code.hpp:679: undefined reference to `boost::system::generic_category()' usr/include/boost/system/error_code.hpp:676:(.text$_ZNK5boost6system14error_category12std_category10equivalentEiRKSt15error_condition+0xa9): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `boost::system::generic_category()' usr/include/boost/system/error_code.hpp:676: undefined reference to `boost::system::generic_category()' ![]() usr/include/boost/system/error_code.hpp:449:(.text$_ZN5boost6system10error_codeC1Ev+0x17): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `boost::system::system_category()'ĬMakeFiles/play.dir/: In function `boost::system::error_category::std_category::equivalent(int, std::error_condition const&) const': usr/include/boost/system/error_code.hpp:449: undefined reference to `boost::system::system_category()' Include_directories($)ĬMakeFiles/play.dir/: In function `boost::system::error_code::error_code()': įind_package(boost 1.66 REQUIRED COMPONENTS system) In Cygwin, the following statements in CMakeLists.txt. Bob on Update keyring first if your Arch Linux is old enough.yong on Why doesn’t Linux device driver need to update file position in read/write functions?.nanxiao on Why doesn’t Linux device driver need to update file position in read/write functions?.LR7 on Update keyring first if your Arch Linux is old enough.Erwin Nindl on Build elfutils-libelf from source code.I am running g++ (Raspbian 8.3.0-6+rpil) 8.3.0 on the Raspberry Pi 4 B (4GB). P.S: I added -lpthread because I was getting errors about pthread, and I added -lboost_system because I already did research on the errors (which used to be a much larger paragraph) and it got rid of most of them. How do I go around working out why this won't compile? I installed Boost using this command: sudo apt install libboost-dev Main.cpp:(.text._ZN5boost4asio5error19get_system_categoryEv+0x8): undefined reference to `boost::system::system_category()'Ĭollect2: error: ld returned 1 exit status usr/bin/ld: /tmp/ccGWgmo2.o: in function `boost::asio::error::get_system_category()': usr/bin/ld: main.cpp:(.text._ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei+0x1fc): undefined reference to `boost::system::generic_category()' usr/bin/ld: main.cpp:(.text._ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei+0x118): undefined reference to `boost::system::generic_category()' Main.cpp:(.text._ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei+0xcc): undefined reference to `boost::system::generic_category()' usr/bin/ld: /tmp/ccGWgmo2.o: in function `boost::system::error_category::std_category::equivalent(std::error_code const&, int) const': usr/bin/ld: main.cpp:(.text._ZNK5boost6system14error_category12std_category10equivalentEiRKSt15error_condition+0x118): undefined reference to `boost::system::generic_category()' Main.cpp:(.text._ZNK5boost6system14error_category12std_category10equivalentEiRKSt15error_condition+0xcc): undefined reference to `boost::system::generic_category()' usr/bin/ld: /tmp/ccGWgmo2.o: in function `boost::system::error_category::std_category::equivalent(int, std::error_condition const&) const': Main.cpp:(.text._ZN5boost6system10error_codeC2Ev+0x1c): undefined reference to `boost::system::system_category()' St::cout << "Socket closed." << std::endl Īnd this is the compile command: g++ -lpthread -lboost_system main.cpp -o testīut when I try to compile the program I get this error: /usr/bin/ld: /tmp/ccGWgmo2.o: in function `boost::system::error_code::error_code()': Std::cout << "Socket opened!" << std::endl ![]() ![]() ![]() Std::cout << "Hello World!" << std::endl I created a simple program in C++ on my RPi to test the Boost library. ![]()
0 Comments
Leave a Reply. |