views:

25

answers:

1

Hi, I was trying to compile the following (example) code via C++ Builder 2010:

http://swarmapps.wordpress.com/2009/11/24/a-simplification-wrapper-for-the-crypto-library/

( pastebin.com/f6bd13d59 / example.cpp )

( pastebin.com/f2fc53f83 / BasicCryptoPPWrap.h )

There were no compiler errors but the linking failed:

[ILINK32 Error] Error: Unresolved external 'CryptoPP::SimpleKeyingInterface::SetKey(const unsigned char *, unsigned int, CryptoPP::NameValuePairs&)' referenced from E:\TEST\DEBUG\FILE1.OBJ

et cetera...

How can I fix this problem?

A: 

from the same page

The wrapper is not a standalone solution. It requires your code to link to libcryptopp and know where the cryptopp header files are found. The Crypto++ website can help you set up your system. Once you get the validation suite to run successfully, you will be able to use this wrapper.

frag
are you using a static or dll version of crypto++?
frag
I'm using the static version. I can compile cryptest_bds.cbproj without any problems. But I got the ILINK32 errors at the project using the wrapper. Maybe I have to change some project settings? but which?
Jane Kolitz
have you added the Crypto++ directory to your include directories and the lib directories. (Sorry for asking so trivial questions)
frag
I don't remember how Builder works (many years ago), but there is some mechanism to add dependencies. Have you added cryptlib as a dependancy?
frag
Yes I have added the directorys + cryptlib as dependency. I can't get what's wrong with it :/
Jane Kolitz
Ok, try it the other way. Locate the cryptlib lib file in your disk and add it as an additional library to your project.
frag
Nice, that's the solution. Thank you very much frag.
Jane Kolitz
glad to be of service
frag