[botan-devel] Cannot build botan under Unix system

Erwan Treguer erwanage at gmail.com
Tue Jul 19 09:27:01 EDT 2011


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&)'
EPIM_Crypt.o(.text+0x247): In function `EPIM_Crypt::EPIM_Crypt()':
: undefined reference to `Botan::LibraryInitializer::deinitialize()'
EPIM_Crypt.o(.text+0x254): In function `EPIM_Crypt::EPIM_Crypt()':
: undefined reference to `Botan::LibraryInitializer::deinitialize()'
EPIM_Crypt.o(.text+0x34c): In function `EPIM_Crypt::EPIM_Crypt()':
: undefined reference to `Botan::LibraryInitializer::initialize(std::string
const&)'
EPIM_Crypt.o(.text+0x497): In function `EPIM_Crypt::EPIM_Crypt()':
: undefined reference to `Botan::LibraryInitializer::deinitialize()'
EPIM_Crypt.o(.text+0x4a4): In function `EPIM_Crypt::EPIM_Crypt()':
: undefined reference to `Botan::LibraryInitializer::deinitialize()'
EPIM_Crypt.o(.text+0x92c): In function `EPIM_Crypt::Encrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::global_state()'
EPIM_Crypt.o(.text+0x934): In function `EPIM_Crypt::Encrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Library_State::algorithm_factory()'
EPIM_Crypt.o(.text+0x93c): In function `EPIM_Crypt::Encrypte(std::string
const&, std::string const&)':
: undefined reference to
`Botan::Algorithm_Factory::prototype_block_cipher(std::string const&,
std::string const&)'
EPIM_Crypt.o(.text+0xbba): In function `EPIM_Crypt::Encrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::AutoSeeded_RNG::AutoSeeded_RNG(unsigned
int)'
EPIM_Crypt.o(.text+0xbe5): In function `EPIM_Crypt::Encrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::get_s2k(std::string const&)'
EPIM_Crypt.o(.text+0xe2e): In function `EPIM_Crypt::Encrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::S2K::derive_key(unsigned int, std::string
const&, unsigned char const*, unsigned int, unsigned int)'
EPIM_Crypt.o(.text+0xfc1): In function `EPIM_Crypt::Encrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::S2K::derive_key(unsigned int, std::string
const&, unsigned char const*, unsigned int, unsigned int)'
EPIM_Crypt.o(.text+0x1150): In function `EPIM_Crypt::Encrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::S2K::derive_key(unsigned int, std::string
const&, unsigned char const*, unsigned int, unsigned int)'
EPIM_Crypt.o(.text+0x146a): In function `EPIM_Crypt::Encrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::MAC_Filter::MAC_Filter(std::string const&,
Botan::OctetString const&, unsigned int)'
EPIM_Crypt.o(.text+0x149e): In function `EPIM_Crypt::Encrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Base64_Encoder::Base64_Encoder(bool,
unsigned int, bool)'
EPIM_Crypt.o(.text+0x14d2): In function `EPIM_Crypt::Encrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Chain::Chain(Botan::Filter*,
Botan::Filter*, Botan::Filter*, Botan::Filter*)'
EPIM_Crypt.o(.text+0x1520): In function `EPIM_Crypt::Encrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::get_cipher(std::string const&,
Botan::OctetString const&, Botan::OctetString const&, Botan::Cipher_Dir)'
EPIM_Crypt.o(.text+0x153f): In function `EPIM_Crypt::Encrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Base64_Encoder::Base64_Encoder(bool,
unsigned int, bool)'
EPIM_Crypt.o(.text+0x1573): In function `EPIM_Crypt::Encrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Chain::Chain(Botan::Filter*,
Botan::Filter*, Botan::Filter*, Botan::Filter*)'
EPIM_Crypt.o(.text+0x15a7): In function `EPIM_Crypt::Encrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Fork::Fork(Botan::Filter*, Botan::Filter*,
Botan::Filter*, Botan::Filter*)'
EPIM_Crypt.o(.text+0x15cf): In function `EPIM_Crypt::Encrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Pipe::Pipe(Botan::Filter*, Botan::Filter*,
Botan::Filter*, Botan::Filter*)'
EPIM_Crypt.o(.text+0x1872): In function `EPIM_Crypt::Encrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Pipe::start_msg()'
EPIM_Crypt.o(.text+0x1882): In function `EPIM_Crypt::Encrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::operator>>(std::istream&, Botan::Pipe&)'
EPIM_Crypt.o(.text+0x188a): In function `EPIM_Crypt::Encrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Pipe::end_msg()'
EPIM_Crypt.o(.text+0x189c): In function `EPIM_Crypt::Encrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Pipe::read_all_as_string(unsigned int)'
EPIM_Crypt.o(.text+0x1a06): In function `EPIM_Crypt::Encrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Pipe::read_all_as_string(unsigned int)'
EPIM_Crypt.o(.text+0x1b58): In function `EPIM_Crypt::Encrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Pipe::~Pipe()'
EPIM_Crypt.o(.text+0x1cdc): In function `EPIM_Crypt::Encrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Pipe::~Pipe()'
EPIM_Crypt.o(.text+0x261e): In function `EPIM_Crypt::Decrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::global_state()'
EPIM_Crypt.o(.text+0x2626): In function `EPIM_Crypt::Decrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Library_State::algorithm_factory()'
EPIM_Crypt.o(.text+0x262e): In function `EPIM_Crypt::Decrypte(std::string
const&, std::string const&)':
: undefined reference to
`Botan::Algorithm_Factory::prototype_block_cipher(std::string const&,
std::string const&)'
EPIM_Crypt.o(.text+0x2a6a): In function `EPIM_Crypt::Decrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::get_s2k(std::string const&)'
EPIM_Crypt.o(.text+0x2c3b): In function `EPIM_Crypt::Decrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::S2K::derive_key(unsigned int, std::string
const&, unsigned char const*, unsigned int, unsigned int)'
EPIM_Crypt.o(.text+0x2dce): In function `EPIM_Crypt::Decrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::S2K::derive_key(unsigned int, std::string
const&, unsigned char const*, unsigned int, unsigned int)'
EPIM_Crypt.o(.text+0x2f5d): In function `EPIM_Crypt::Decrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::S2K::derive_key(unsigned int, std::string
const&, unsigned char const*, unsigned int, unsigned int)'
EPIM_Crypt.o(.text+0x30d6): In function `EPIM_Crypt::Decrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::MAC_Filter::MAC_Filter(std::string const&,
Botan::OctetString const&, unsigned int)'
EPIM_Crypt.o(.text+0x310a): In function `EPIM_Crypt::Decrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Base64_Encoder::Base64_Encoder(bool,
unsigned int, bool)'
EPIM_Crypt.o(.text+0x313e): In function `EPIM_Crypt::Decrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Chain::Chain(Botan::Filter*,
Botan::Filter*, Botan::Filter*, Botan::Filter*)'
EPIM_Crypt.o(.text+0x3171): In function `EPIM_Crypt::Decrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Fork::Fork(Botan::Filter*, Botan::Filter*,
Botan::Filter*, Botan::Filter*)'
EPIM_Crypt.o(.text+0x31ba): In function `EPIM_Crypt::Decrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::get_cipher(std::string const&,
Botan::OctetString const&, Botan::OctetString const&, Botan::Cipher_Dir)'
EPIM_Crypt.o(.text+0x31da): In function `EPIM_Crypt::Decrypte(std::string
const&, std::string const&)':
: undefined reference to
`Botan::Base64_Decoder::Base64_Decoder(Botan::Decoder_Checking)'
EPIM_Crypt.o(.text+0x31fc): In function `EPIM_Crypt::Decrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Pipe::Pipe(Botan::Filter*, Botan::Filter*,
Botan::Filter*, Botan::Filter*)'
EPIM_Crypt.o(.text+0x349f): In function `EPIM_Crypt::Decrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Pipe::start_msg()'
EPIM_Crypt.o(.text+0x34af): In function `EPIM_Crypt::Decrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::operator>>(std::istream&, Botan::Pipe&)'
EPIM_Crypt.o(.text+0x34b7): In function `EPIM_Crypt::Decrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Pipe::end_msg()'
EPIM_Crypt.o(.text+0x34c9): In function `EPIM_Crypt::Decrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Pipe::read_all_as_string(unsigned int)'
EPIM_Crypt.o(.text+0x350c): In function `EPIM_Crypt::Decrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Pipe::read_all_as_string(unsigned int)'
EPIM_Crypt.o(.text+0x36e8): In function `EPIM_Crypt::Decrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Pipe::~Pipe()'
EPIM_Crypt.o(.text+0x3a67): In function `EPIM_Crypt::Decrypte(std::string
const&, std::string const&)':
: undefined reference to `Botan::Pipe::~Pipe()'
EPIM_Crypt.o(.text+0x4132): In function
`EPIM_Crypt::b64_encode(Botan::SecureVector<unsigned char> const&)':
: undefined reference to `Botan::Base64_Encoder::Base64_Encoder(bool,
unsigned int, bool)'
EPIM_Crypt.o(.text+0x4155): In function
`EPIM_Crypt::b64_encode(Botan::SecureVector<unsigned char> const&)':
: undefined reference to `Botan::Pipe::Pipe(Botan::Filter*, Botan::Filter*,
Botan::Filter*, Botan::Filter*)'
EPIM_Crypt.o(.text+0x4161): In function
`EPIM_Crypt::b64_encode(Botan::SecureVector<unsigned char> const&)':
: undefined reference to
`Botan::Pipe::process_msg(Botan::MemoryRegion<unsigned char> const&)'
EPIM_Crypt.o(.text+0x416a): In function
`EPIM_Crypt::b64_encode(Botan::SecureVector<unsigned char> const&)':
: undefined reference to `Botan::Pipe::DEFAULT_MESSAGE'
EPIM_Crypt.o(.text+0x4173): In function
`EPIM_Crypt::b64_encode(Botan::SecureVector<unsigned char> const&)':
: undefined reference to `Botan::Pipe::read_all_as_string(unsigned int)'
EPIM_Crypt.o(.text+0x4186): In function
`EPIM_Crypt::b64_encode(Botan::SecureVector<unsigned char> const&)':
: undefined reference to `Botan::Pipe::~Pipe()'
EPIM_Crypt.o(.text+0x419c): In function
`EPIM_Crypt::b64_encode(Botan::SecureVector<unsigned char> const&)':
: undefined reference to `Botan::Pipe::~Pipe()'
EPIM_Crypt.o(.text+0x41d1): In function `EPIM_Crypt::b64_decode(std::string
const&)':
: undefined reference to
`Botan::Base64_Decoder::Base64_Decoder(Botan::Decoder_Checking)'
EPIM_Crypt.o(.text+0x41f5): In function `EPIM_Crypt::b64_decode(std::string
const&)':
: undefined reference to `Botan::Pipe::Pipe(Botan::Filter*, Botan::Filter*,
Botan::Filter*, Botan::Filter*)'
EPIM_Crypt.o(.text+0x4201): In function `EPIM_Crypt::b64_decode(std::string
const&)':
: undefined reference to `Botan::Pipe::process_msg(std::string const&)'
EPIM_Crypt.o(.text+0x420a): In function `EPIM_Crypt::b64_decode(std::string
const&)':
: undefined reference to `Botan::Pipe::DEFAULT_MESSAGE'
EPIM_Crypt.o(.text+0x4213): In function `EPIM_Crypt::b64_decode(std::string
const&)':
: undefined reference to `Botan::Pipe::read_all(unsigned int)'
EPIM_Crypt.o(.text+0x4226): In function `EPIM_Crypt::b64_decode(std::string
const&)':
: undefined reference to `Botan::Pipe::~Pipe()'
EPIM_Crypt.o(.text+0x423c): In function `EPIM_Crypt::b64_decode(std::string
const&)':
: undefined reference to `Botan::Pipe::~Pipe()'
EPIM_Crypt.o(.gnu.linkonce.t._ZN5Botan12MemoryRegionIhE4initEbj+0x10): In
function `Botan::MemoryRegion<unsigned char>::init(bool, unsigned int)':
: undefined reference to `Botan::Allocator::get(bool)'

Here's my Makefile:

NAME    =       EPIM_Crypt
SRC     =       main.cpp \
                EPIM_Crypt.cpp

OBJ     =       $(SRC:.cpp=.o)
RM      =       rm -f
INCLUDE =       -I. -I./botan/include/ -L./botan/lib/
CFLAGS  +=      $(INCLUDE) -Wall
CC              =       g++

all:    $(OBJ)
        $(CC) $(OBJ) -o $(NAME)

clean:
        $(RM) $(OBJ)
        $(RM) *~
        $(RM) *#

fclean: clean
        $(RM) $(NAME)

re: fclean all

.PHONY: all clean re fclean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.randombit.net/pipermail/botan-devel/attachments/20110719/80f59885/attachment.html>


More information about the botan-devel mailing list