Not compile Crypto++ with C++ Builder 10 Seattle

237 views
Skip to first unread message

Oleg S

unread,
Mar 30, 2016, 4:34:58 AM3/30/16
to Crypto++ Users
Win7 x64, 8Gb RAM.
When compile cryptlib_bds.lib I'm see next error:
    [bcc32 Error] misc.h(1112): E2268 Call to undefined function 'wcstombs'

I'm add in misc.h string:
   #include <stdlib.h>

When try next compile we see:
How I may corrected this error ?



Jeffrey Walton

unread,
Mar 30, 2016, 8:29:02 AM3/30/16
to Crypto++ Users

We added some fixes for Borland a couple of months ago. You should probably use the latest sources from Wei Dai's GitHub at https://github.com/weidai11/cryptopp.

If you are using the latest source code, then could you provide a small test program that duplicates the issue? Also, provide the text of the error and not a screen shot. The screen capture is too small, and I can't read it even with my glasses on.

The bigger problem is we don't have access to the C++ Builder toolchain to perform testing. I tried to get remote access to them from Embarcadero. I also tried to obtain a gratis license from Embarcadero. Neither materialized, so the library is not well tested with their toolchain.

Jeff
Message has been deleted

Ayse Sahin

unread,
Aug 7, 2016, 3:04:42 PM8/7/16
to Crypto++ Users
Hi Jeffrey,

I am trying to compile with Borland compiler, but it gives the belowing error.

Is there anything that you suggest.

Thank you 

[ 91%] Building CXX object CMakeFiles/cryptest.dir/bench1.cpp.obj
Embarcadero C++ 6.90 for Win32 Copyright (c) 1993-2014 Embarcadero Technologies, Inc.
C:\WORK\cryptopp563\cryptopp-master\bench1.cpp:
Warning W8041 C:\WORK\cryptopp563\cryptopp-master\misc.h 691: Negating unsigned value in function TrailingZeros(unsigned int)
Error E2040 C:\WORK\cryptopp563\cryptopp-master\factory.h 91: Declaration terminated incorrectly in function ObjectFactoryRegistry<AuthenticatedSymmetricCipher,0>::Registry(...)
Error E2451 C:\WORK\cryptopp563\cryptopp-master\factory.h 93: Undefined symbol 's_registry' in function ObjectFactoryRegistry<AuthenticatedSymmetricCipher,0>::Registry(...)
Error E2357 C:\WORK\cryptopp563\cryptopp-master\factory.h 93: Reference initialized with 'undefined', needs lvalue of type 'ObjectFactoryRegistry<AuthenticatedSymmetricCipher,0>' in function ObjectFactoryRegistry<AuthenticatedSymmetricCipher,0>::Registry(...)
Warning W8008 C:\WORK\cryptopp563\cryptopp-master\misc.h 542: Condition is always false in function string IntToString<unsigned int>(unsigned int,unsigned int)
Error E2040 C:\WORK\cryptopp563\cryptopp-master\factory.h 91: Declaration terminated incorrectly in function ObjectFactoryRegistry<MessageAuthenticationCode,0>::Registry(...)
Error E2451 C:\WORK\cryptopp563\cryptopp-master\factory.h 93: Undefined symbol 's_registry' in function ObjectFactoryRegistry<MessageAuthenticationCode,0>::Registry(...)
Error E2357 C:\WORK\cryptopp563\cryptopp-master\factory.h 93: Reference initialized with 'undefined', needs lvalue of type 'ObjectFactoryRegistry<MessageAuthenticationCode,0>' in function ObjectFactoryRegistry<MessageAuthenticationCode,0>::Registry(...)
Error E2040 C:\WORK\cryptopp563\cryptopp-master\factory.h 91: Declaration terminated incorrectly in function ObjectFactoryRegistry<HashTransformation,0>::Registry(...)
Error E2451 C:\WORK\cryptopp563\cryptopp-master\factory.h 93: Undefined symbol 's_registry' in function ObjectFactoryRegistry<HashTransformation,0>::Registry(...)
Error E2357 C:\WORK\cryptopp563\cryptopp-master\factory.h 93: Reference initialized with 'undefined', needs lvalue of type 'ObjectFactoryRegistry<HashTransformation,0>' in function ObjectFactoryRegistry<HashTransformation,0>::Registry(...)
Error E2040 C:\WORK\cryptopp563\cryptopp-master\factory.h 91: Declaration terminated incorrectly in function ObjectFactoryRegistry<SymmetricCipher,0>::Registry(...)
Error E2451 C:\WORK\cryptopp563\cryptopp-master\factory.h 93: Undefined symbol 's_registry' in function ObjectFactoryRegistry<SymmetricCipher,0>::Registry(...)
Error E2357 C:\WORK\cryptopp563\cryptopp-master\factory.h 93: Reference initialized with 'undefined', needs lvalue of type 'ObjectFactoryRegistry<SymmetricCipher,0>' in function ObjectFactoryRegistry<SymmetricCipher,0>::Registry(...)
*** 12 errors in Compile ***

** error 2 ** deleting CMakeFiles\cryptest.dir\bench1.cpp.obj

Jeffrey Walton

unread,
Aug 7, 2016, 4:37:01 PM8/7/16
to Crypto++ Users

[ 91%] Building CXX object CMakeFiles/cryptest.dir/bench1.cpp.obj
Embarcadero C++ 6.90 for Win32 Copyright (c) 1993-2014 Embarcadero Technologies, Inc.
C:\WORK\cryptopp563\cryptopp-master\bench1.cpp:
Warning W8041 C:\WORK\cryptopp563\cryptopp-master\misc.h 691: Negating unsigned value in function TrailingZeros(unsigned int)

The warning can be safely ignored. We're interested in the bit pattern, and not a signed/unsigned value.
 
Error E2040 C:\WORK\cryptopp563\cryptopp-master\factory.h 91: Declaration terminated incorrectly in function ObjectFactoryRegistry<AuthenticatedSymmetricCipher,0>::Registry(...)
Error E2451 C:\WORK\cryptopp563\cryptopp-master\factory.h 93: Undefined symbol 's_registry' in function ObjectFactoryRegistry<AuthenticatedSymmetricCipher,0>::Registry(...)
Error E2357 C:\WORK\cryptopp563\cryptopp-master\factory.h 93: Reference initialized with 'undefined', needs lvalue of type 'ObjectFactoryRegistry<AuthenticatedSymmetricCipher,0>' in function ObjectFactoryRegistry<AuthenticatedSymmetricCipher,0>::Registry(...)

I'm not sure about these.

Is the issue present when when using Borand project files?

Jeff
Reply all
Reply to author
Forward
0 new messages