On Sunday, March 20, 2016 at 5:22:28 PM UTC-4, Gaetano Mendola wrote:
>
> The following snippet:
>
> #include <cryptopp/hex.h>
> int main() {
>   CryptoPP::HexDecoder myHexDecoder;
> }
>
>
> does not link with clang++-3.8/clang++3.7 while it links just fine with 
> gcc5.3.1
>
> $ apt-show-versions libcrypto++-dev
> libcrypto++-dev:amd64/xenial 5.6.1-9 uptodate
>
>
> The error:
> $ clang++-3.8 main.cpp -lcrypto++
> /tmp/main-1ac893.o: In function 
> `CryptoPP::Unflushable<CryptoPP::Filter>::Flush(bool, int, bool)':
> main.cpp:(.text._ZN8CryptoPP11UnflushableINS_6FilterEE5FlushEbib[_ZN8CryptoPP11UnflushableINS_6FilterEE5FlushEbib]+0xf):
>  undefined reference to `CryptoPP::DEFAULT_CHANNEL'
> clang: error: linker command failed with exit code 1 (use -v to see 
> invocation)
>
>
So it looks like the canonical reference for this issue is going to be 
"GCC5 and the C++11 ABI", 
https://developerblog.redhat.com/2015/02/05/gcc5-and-the-c11-abi/.

<SNIP>

Many users routinely rebuild all their code when they change compilers; 
such users will be unaffected by this change. Code built with an earlier 
compiler will also continue to work with the new libstdc++, which provides 
both old and new ABIs.


Users that depend on third-party libraries or plugin interfaces that still 
use the old ABI can build their code with -D_GLIBCXX_USE_CXX11_ABI=0 and 
everything should work fine. In most cases, it will be obvious when this 
flag is needed because of errors from the linker complaining about 
unresolved symbols involving “__cxx11”.

Providers of such libraries or interfaces need to consider whether they 
want to provide ABI coexistence, like libstdc++ does, or require their 
users to rebuild.  If they want to provide coexistence, they need to 
understand how to handle the change.
</SNIP>

I'm going to attempt the "coexist thing" mentioned in the post. If 
successful, then maybe we can get Debian and Fedora to build us with it.

Jeff

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to