On Sep 12, 12:10 am, Jeffrey Walton <[email protected]> wrote: > Hi All, > > Has anyone come across an error using Crypto++ on OpenBSD 4.8? I seem > to have a problem in my program when using Crypto++ (Crypto++ itself > builds and tests OK). > > OpenBSD 4.8 uses GCC 4.2.1, and the GCC bug was fixed in GCC 4.3.0 > (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34009). The first > offending item from cryptlib.h:99 is the template below: > > // VC60 workaround: using enums as template parameters causes problems > template <typename ENUM_TYPE, int VALUE> > struct EnumToType > { > static ENUM_TYPE ToEnum() {return (ENUM_TYPE)VALUE;} > > }; > > $ gmake test > g++ -g2 -ggdb -O0 -DSAFEINT_DISALLOW_UNSIGNED_NEGATION=1 -pipe > -fsigned-char -fmessage-length=0 -Woverloaded-virtual -Wreorder > -Wformat=2 -Wformat-security -Wno-unused -fvisibility=hidden > -fstack-protector -I. -I./esapi -I./deps -I/usr/local/include -fpic -c > test/crypto/PlainTextTest.cpp -o test/crypto/PlainTextTest.o > In file included from /usr/include/cryptopp/misc.h:4, > from ./esapi/crypto/Crypto++Common.h:24, > from ./esapi/crypto/PlainText.h:19, > from test/crypto/PlainTextTest.cpp:29: > /usr/include/cryptopp/cryptlib.h:99: error: template with C linkage > /usr/include/cryptopp/cryptlib.h:247: error: template with C linkage > /usr/include/cryptopp/cryptlib.h:254: error: template with C linkage > /usr/include/cryptopp/cryptlib.h:261: error: template with C linkage > /usr/include/cryptopp/cryptlib.h:268: error: template with C linkage > /usr/include/cryptopp/cryptlib.h:293: error: template with C linkage > /usr/include/cryptopp/cryptlib.h:698: error: template with C linkage > [SNIP] The problem was installing Crypto++ into /usr/include and /usr/lib. The makefile needed to be modified to install into /usr/local/include and /usr/local/lib (thanks to Marc Glisse on GCC mailing list).
-- 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.
