Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22472

Linker cannot find implementation in include directory

$
0
0

I'm using gcc on WSL to compile a C++Linux project. I wanted to use the base64 encode/decode library so I installed it with vcpkg. I'm including the library's functions via #include <cpp-base64/base64.h>. However, this causes a linker error:

undefined reference to `base64_encode[abi:cxx11](unsigned char const*, unsigned int)'

Upon investigating the include directory, I see nothing unusual:

/bin/vcpkg/installed/x64-linux/include/cpp-base64$ lsbase64.cpp  base64.h

As a test I decided to copy the base64.cpp into my source code directory directly and it linked correctly. Why is this happening? Shouldn't the linker pick up the base64.cpp implementation from the include directory without any problems?


Viewing all articles
Browse latest Browse all 22472

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>