Reputation: 531
When I compile a source file using option:
-lbotan-2
which means using the shared library, nothing goes wrong.
But after I switch to option:
-l:libbotan-2.a
which means using the static library, an error occurs:
//usr/local/lib/libbotan-2.a(pubkey_rsa.o): In function std::future<std::result_of<Botan::Fixed_Exponent_Power_Mod const& (Botan::BigInt const&)>::type> std::async<Botan::Fixed_Exponent_Power_Mod const&, Botan::BigInt const&>(std::launch, Botan::Fixed_Exponent_Power_Mod const&, Botan::BigInt const&)':
rsa.cpp:(.text._ZSt5asyncIRKN5Botan24Fixed_Exponent_Power_ModEJRKNS0_6BigIntEEESt6futureINSt9result_ofIFT_DpT0_EE4typeEESt6launchOS9_DpOSA_[_ZSt5asyncIRKN5Botan24Fixed_Exponent_Power_ModEJRKNS0_6BigIntEEESt6futureINSt9result_ofIFT_DpT0_EE4typeEESt6launchOS9_DpOSA_]+0x379): undefined reference to
pthread_create'
collect2: error: ld returned 1 exit status
I'm using Botan 2.1.0 and c++11 under Ubuntu 16.04.
Any ideas what goes wrong?
Thanks in advance.
Upvotes: 3
Views: 469