[Botan] Compile Botan base.cpp with g++

Zaki Akhmad zakiakhmad at gmail.com
Fri Oct 22 06:56:01 UTC 2010


On Thu, Oct 21, 2010 at 2:51 PM, Zaki Akhmad <zakiakhmad at gmail.com> wrote:
> Hello,
>
> I am newbie with botan[1] here. I try to compile base.cpp botan file
> from /usr/share/doc/libbotan1.8-dev/examples/ with g++ from my Ubuntu
> Lucid. And here's the result:
>
> $ g++ -o base base.cpp
> /tmp/ccuCaO9N.o: In function
> `Botan::LibraryInitializer::LibraryInitializer(std::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&)':
> base.cpp:(.text._ZN5Botan18LibraryInitializerC1ERKSs[Botan::LibraryInitializer::LibraryInitializer(std::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&)]+0xd):
> undefined reference to
> `Botan::LibraryInitializer::initialize(std::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&)'
> /tmp/ccuCaO9N.o: In function `Botan::LibraryInitializer::~LibraryInitializer()':
> base.cpp:(.text._ZN5Botan18LibraryInitializerD1Ev[Botan::LibraryInitializer::~LibraryInitializer()]+0x7):
> undefined reference to `Botan::LibraryInitializer::deinitialize()'
> collect2: ld returned 1 exit status
>
> What options I should enter? Any hint?

Problems solved now :-)
$ g++ -o base base.cpp -lbotan

Voila!

-- 
Zaki Akhmad




More information about the ubuntu-users mailing list