undefined reference to Poco::DigestEngine
See original GitHub issuefirst, git clone https://github.com/conan-io/examples.git
and then cd into libraries/poco/md5
run ./build.sh
got error like that:
+ cmake --build .
Scanning dependencies of target md5
[ 50%] Building CXX object CMakeFiles/md5.dir/md5.cpp.o
[100%] Linking CXX executable bin/md5
CMakeFiles/md5.dir/md5.cpp.o: In function `main':
md5.cpp:(.text.startup+0x9b): undefined reference to `Poco::DigestEngine::digestToHex[abi:cxx11](std::vector<unsigned char, std::allocator<unsigned char> > const&)’ collect2: error: ld returned 1 exit status CMakeFiles/md5.dir/build.make:83: recipe for target ‘bin/md5’ failed make[2]: *** [bin/md5] Error 1 CMakeFiles/Makefile2:72: recipe for target ‘CMakeFiles/md5.dir/all’ failed make[1]: *** [CMakeFiles/md5.dir/all] Error 2 Makefile:83: recipe for target ‘all’ failed make: *** [all] Error 2
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:5 (3 by maintainers)
Top Results From Across the Web
undefined reference to (function) c++ [duplicate] - Stack Overflow
This is true in general case, but first thing you think about when somebody asks about undefined reference in C++ should be "does...
Read more >Numerous linking errors "undefined reference to `libXX_YY"
I've been trying to compile an open-source C++ project Typesense, which has this list of dependencies: Snappy; zlib; OpenSSL (>=1.0.2); curl ...
Read more >C compilation Error: undefined reference to - YouTube
C compilation Error: undefined reference to. Watch later. Share. Copy link. Info. Shopping. Tap to unmute. If playback doesn't begin shortly ...
Read more >How to fix "undefined reference" error? - NXP Community
Solved: Hello I'm developing code for evkmimxrt1060 using the mcuxpressoide IDE. I added unity (https://github.com/ ThrowTheSwitch/Unity) testcode in.
Read more >Undefined references problem when compiling c++ test code
Hello. I have been experiencing multiple undefined reference problems when trying to compile a very simple c++ source code. In fact, the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
HI @bill-luu
Glad that you fixed it. We will be fixing this for Conan 2.0 (now it will be breaking). To summarize:
compiler.libcxx=libstdc++
for wider compatibility in all distros and gcc versionslibstdc++11
libstdc++
I had the same issues as the other two, using Elementary OS 5.0 Juno (Based on Ubuntu 18.04.2)
As suggested, I fixed it by editing
~/.conan/profiles/default
and editing the line compilter.libcxx line tocompiler.libcxx=libstdc++11
The entire file: