[botan-devel] Cannot build botan under Unix system

Jack Lloyd lloyd at randombit.net
Tue Jul 19 10:45:39 EDT 2011

On Tue, Jul 19, 2011 at 03:27:01PM +0200, Erwan Treguer wrote:
> Thanks I managed to build it.
> But now, when I want to build my project I got a lot of undifined references
> to Botan lib.
> c++ -O -pipe -I. -I./botan/include/ -L./botan/lib/ -Wall -c main.cpp
> c++ -O -pipe -I. -I./botan/include/ -L./botan/lib/ -Wall -c EPIM_Crypt.cpp
> g++ main.o EPIM_Crypt.o -o EPIM_Crypt
> EPIM_Crypt.o(.text+0xfc): In function `EPIM_Crypt::EPIM_Crypt()':
> : undefined reference to `Botan::LibraryInitializer::initialize(std::string
> const&)'

You need to link in the library with -lbotan. -L only sets the search
path, it doesn't link anything in (and -L (and -l) only make sense in the
final link stage, not when compiling)


More information about the botan-devel mailing list