Hi Kody, > misc.h:159: error: `memcpy' undeclared (first use this function) I suppose the question is, what #include must QNX6 use to get in functions such as memcpy? I beleive a similar situation is encounter with MetroWerks Code Warrior (IIRC). But I'm a Microsoft Visual C kind of guy.
Jeff On 8/14/07, kody0 <[EMAIL PROTECTED]> wrote: > > I've tried to compile the cryptopp library under QNX 6 but it failed > with the following errors: > > <code> > C:/QNX630/host/win32/x86/usr/bin/ntoppc-gcc-3.3.5 -BC:/QNX630/host/ > win32/x86/usr/ntoppc/bin -c -o algebra.o -DUNIX -fPIC -DPPC - > D__BIGENDIAN__ -O0 -g -DMG_DEBUG -Wall -Wno-format -Wno- > unused-function -DQNX -Dunix -DFALCON -D__BIG_ENDIAN__ -D__unix__ - > pipe -DOSTYPE=qnx -I. -IC:/QNX630/target/qnx6/usr/include -IC:/QNX630/ > target/qnx6/usr/include/cpp -IC:/QNX630/target/qnx6/usr/include/cpp/ > c algebra.cpp > In file included from secblock.h:7, > from integer.h:7, > from algebra.cpp:9: > misc.h: In function `void CryptoPP::memcpy_s(void*, unsigned int, > const void*, > unsigned int)': > misc.h:159: error: `memcpy' undeclared (first use this function) > misc.h:159: error: (Each undeclared identifier is reported only once > for each > function it appears in.) > misc.h: In function `void CryptoPP::memmove_s(void*, unsigned int, > const void*, > unsigned int)': > misc.h:166: error: `memmove' undeclared (first use this function) > secblock.h: In member function `void CryptoPP::AllocatorWithCleanup<T, > T_Align16>::deallocate(void*, typename > CryptoPP::AllocatorBase<T>::size_type) [with T = word32, bool > T_Align16 = > false]': > secblock.h:298: instantiated from `CryptoPP::SecBlock<T, > A>::~SecBlock() [with T = word, A = CryptoPP::AllocatorWithCl > eanup<word32, false>]' > integer.h:224: instantiated from here > secblock.h:142: error: `free' undeclared (first use this function) > make[2]: *** [../../../bin_qnx_ppc_mg7000/lic/licmgr/cryptopp/ > algebra.o] Error 1 > make[2]: Leaving directory `T:/NaMX/depot/user/dbeaulieu/NAMX/2.0/lic/ > licmgr/cryptopp' > make[1]: *** [lic/licmgr/cryptopp.dir] Error 2 > make[1]: Leaving directory `T:/NaMX/depot/user/dbeaulieu/NAMX/2.0' > </code> > > It complains that it cannot find the headers file for both the free > and the memcpy function. This is happening in the memcpy_s function. > QNX 6 doesn't have these function available so the > __STDC_WANT_SECURE_LIB__ define equals 0 (or is undefined). > > To make the library compile, I've added this two headers in the misc.h > header file: > > <code> > #ifdef QNX > // memcpy function and free includes > #include <string.h> > #include <malloc.h> > #endif > </code> > > Afterwards, the library compiles successfully. But it is unclear to me > whether there is a better way of doing this... Maybe I am missing a > preprocessor define that would include these? Also does this void the > license if I plan to use it in a commercial product? > > Thanks > > > > > --~--~---------~--~----~------------~-------~--~----~ 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. -~----------~----~----~----~------~----~------~--~---
