Category : ld

I have a custom static library called "libcurlwrapper", which just wrapps the execution of libcurl functions, and a main app which calls the library’s function. Compiling the library works, but when it comes to linking the main app I get these errors: /usr/bin/ld: .//libcurlwrapper.a(curl_wrapper.o): in function `http3_demo()’: curl_wrapper.cpp:(.text+0xd): undefined reference to `curl_easy_init’ /usr/bin/ld: curl_wrapper.cpp:(.text+0x39): undefined ..

Read more

I’m building something with conda-build and cmake. cmake is being invoked with: cmake -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX -DCMAKE_CXX_FLAGS="-O3 -fstack-protector -pthread -D_GLIBCXX_USE_CXX11_ABI=0 –std=gnu++17 -L$CONDA_PREFIX/lib/ -lpolyphemus" This is giving me the following error during linking: polarwriter.cpp:(.text+0xe2e): undefined reference to `Polyphemus::Log::Stream()’ $CONDA_PREFIX/lib contains libpolyphemus.a, and checking that with nm shows: 0000000000000860 T Polyphemus::Log::Stream[abi:cxx11]() …which says to me that the reference it’s ..

Read more

I have some binary .fic files in a proprietary format , I have a wd250hf64.so from this vendor that contains a C++ method CComposanteHyperFile::HExporteXML(wchar_t* const path) that I can see using nm $ nm –demangle wd250hf64.so –defined-only 0000000000118c90 t CComposanteHyperFile::HExporteXML(wchar_t const*) the unmangled version _ZN20CComposanteHyperFile11HExporteXMLEPKw is identical to what I have using my local g++ ..

Read more

I’m trying to mock a static function without modifying the source code. This is because we have a large legacy base of code and we would like to add test code without requiring developers to go through and change a bunch of the original code. Using objcopy, I can play with functions between object files, ..

Read more

I’m compiling some cpp files with: $ ​g++ -c –std=c++17 -I/antlr4/runtime/Cpp/runtime/src/ *.cpp And everything goes fine: $ ls -l *.cpp *.o -rw-r–r– 1 root root 76637 Dec 1 14:33 Java8Lexer.cpp -rw-r–r– 1 root root 370768 Dec 1 15:13 Java8Lexer.o -rw-r–r– 1 root root 925012 Dec 1 14:33 Java8Parser.cpp -rw-r–r– 1 root root 5037896 Dec 1 ..

Read more

I am trying to build a ROS project Flightmare drone simulator but when i try to build one of the packages to get the motion planning node I get an error with the ld. Errors << flightros:make /home/maverick/upwork_projects/michael_rosso_ws/logs/flightros/build.make.043.log /usr/bin/ld: CMakeFiles/motion_planning.dir/src/motion_planning/motion_planning.cpp.o: in function `ompl::base::SE3StateSpace::SE3StateSpace()’: motion_planning.cpp:(.text._ZN4ompl4base13SE3StateSpaceC2Ev[_ZN4ompl4base13SE3StateSpaceC5Ev]+0x3d): undefined reference to `ompl::base::StateSpace::getName() const’ /usr/bin/ld: motion_planning.cpp:(.text._ZN4ompl4base13SE3StateSpaceC2Ev[_ZN4ompl4base13SE3StateSpaceC5Ev]+0x5f): undefined reference to `ompl::base::StateSpace::setName(std::string ..

Read more