|
|
Comments and Discussions
|
|
 |

|
See more: cryptographyC++/MFCWinCe I have read this article: http://www.cryptopp.com/wiki/Windows_Mobile And download the project winmobile-cryptopp.zip, with that project I got the lib. But when I add the lib file into my wince project, I got error: fatal error C1083: Cannot open include file: 'intrin.h': No such file or directory. The intrin.h is not a part of Windows CE, the armintr.h is for wince, but I didn't find it in my dictionary. Dose anybody can help me, tell me how to create a new project use for wince with Crypto++ lib. bwt:I have Visual Studio 2005 and Windows Pocket PC 2003. .
|
|
|
|

|
Does anybod have working solution file of cryto++ v5.6.1 for vc2010? The current 5.6.1 has a solution file for vc2005 which works fine for an atl project in vc2005. However, the libraries built from vc2005 gave continuously linking errors when it was used for an atl com project in vc2010. that's why I am looking for a working solution file for vc2010. thx
|
|
|
|

|
about 6 posts beneath yours is one from Nicholas Skradski, and one from hjkhjghjk - both have done it under 2010
Unfortunately I only have a VC6 and VC2005 environment - I might be able to purloin a VC2010 VM, but that wont be at least until the weekend
'g'
|
|
|
|

|
Yes please send me one if you successfully build the library under 2010. The guy hjkhjghjk says he done it, but he seems not answering to my email requesting the source for 2010 yet. thx
|
|
|
|

|
ehaerim wrote: However, the libraries built from vc2005 gave continuously linking errors when
it was used for an atl com project in vc2010.
You have to use the same version of Visual Studio for all components.
Either build Crypto++ and the ATL DLL with VS2005, or build them both with VS2010.
Jeff
|
|
|
|

|
At the beginning, I tried to build the library using 2010 but it also failed several times. So, I gave up and am waiting for someone to provide the solution file for 2010. If you have one, would you be able to upload it so that I can download? thx
|
|
|
|

|
ehaerim wrote: At the beginning, I tried to build the library using 2010 but it also failed
several times.
Now you know you need to use the same runtime (static versus dynamic) and the same version of Visual Studio. Revisit The Four Steps[^] and you should be good to go.
Since you seem to want to use VS2010, I would probably use VS2010 for both projects.
Jeff
|
|
|
|

|
Using this library requires really huge patience... Up to now, I've been struggling with this and never succeeded yet. And almost everybody suffers from similar painful job of compiling/linking and so on.
Reading/trying all the stuffs here still does not work in my simple VC2010 ATL COM (out-of-proc) project. I built the library using cryptest.sln from cryptopp v5.6.1 under VC2005. After successful build, I see Win32/dll-ouput and Win32/output folder each having debug/release subfolders. I copied the library files into the source/header folder of cryptopp v5.6.1 as suggested. And also, added all the necessary header/library/source path to the project directories and additional include/lib paths. Then my VC2010 ATL project use the library like : #include "gzip.h" USING_NAMESPACE( CryptoPP ) // Crypto++ Library #ifdef _DEBUG #pragma comment ( lib, "cryptlibd" ) #else #pragma comment ( lib, "cryptlib" ) #endif CryptoPP::Gzip zipper; zipper.Put((BYTE *)pData, Size); zipper.MessageEnd(); *pRetSize = (LONG)zipper.MaxRetrievable(); *ppCompData = new BYTE[*pRetSize]; zipper.Get((BYTE *)*ppCompData, *pRetSize);
I tried both static and dll-import library and still getting lots of link 2001 and link 2019 errors. 1>cryptlibd.lib(zinflate.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(gzip.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(queue.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(algparam.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(mqueue.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(cryptlib.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::append(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int,unsigned int)" (?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z) 1>cryptlibd.lib(crc.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(zdeflate.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(filters.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(zinflate.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) referenced in function "public: class CryptoPP::HuffmanDecoder * __thiscall CryptoPP::NewFixedLiteralDecoder::operator()(void)const " (??RNewFixedLiteralDecoder@CryptoPP@@QBEPAVHuffmanDecoder@1@XZ) 1>cryptlibd.lib(gzip.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) 1>cryptlibd.lib(queue.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) 1>cryptlibd.lib(algparam.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) 1>cryptlibd.lib(mqueue.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) 1>cryptlibd.lib(cryptlib.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) 1>cryptlibd.lib(crc.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) 1>cryptlibd.lib(zdeflate.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) 1>cryptlibd.lib(filters.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) This library just requires so much pains and efforts which beyond my ability at the moment. Can someone help me with this issues please? thx HR
-- modified 27 Nov '11 - 19:03.
|
|
|
|

|
By default Visual Studio creates a project which uses the dynamic (DLL) version of the C/C++ runtime. With COM, I don't believe it can be changed (I might be wrong here).
Crypto++ uses the static (non-DLL) version of the C/C++ runtime.
You need to use the same version of the C/C++ runtime for both your project and the Crypto++ library. Since COM requires the DLL version, you will need to change Crypto++'s use of the C/C++ runtime library. Do it for both Debug and Release, and x86 and x64.
To change the runtime library in Crypto++, richt click on the 'cryptlib' project in Visual Studio, and select properties. Navigate to C/C++ -> Code Generation. Change 'Multi-threaded Debug' to 'Multi-threaded Debug DLL'; and 'Multi-threaded' to 'Multi-threaded DLL' for Release.
Jeff
|
|
|
|

|
Thanks for the prompt reply. But I already changed my ATL COM project from the default dynamic version to static version. So, I see Multi-threaded (/MT) and Multi-threaed Debug (/MTd) for my ATL project. I still get the link errors. 1>cryptlibd.lib(zinflate.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(gzip.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(queue.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(algparam.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(mqueue.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(cryptlib.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::append(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int,unsigned int)" (?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z) 1>cryptlibd.lib(crc.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(zdeflate.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(filters.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(zinflate.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) referenced in function "public: class CryptoPP::HuffmanDecoder * __thiscall CryptoPP::NewFixedLiteralDecoder::operator()(void)const " (??RNewFixedLiteralDecoder@CryptoPP@@QBEPAVHuffmanDecoder@1@XZ) 1>cryptlibd.lib(gzip.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) 1>cryptlibd.lib(queue.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) 1>cryptlibd.lib(algparam.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) 1>cryptlibd.lib(mqueue.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) 1>cryptlibd.lib(cryptlib.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) 1>cryptlibd.lib(crc.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) 1>cryptlibd.lib(zdeflate.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) 1>cryptlibd.lib(filters.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) HR
|
|
|
|

|
ehaerim wrote: 1>cryptlibd.lib(zinflate.obj) : error LNK2001: unresolved external symbol
"public: static void __cdecl std::_String_base::_Xlen(void)"
(?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(gzip.obj) : error
LNK2001: unresolved external symbol "public: static void __cdecl
std::_String_base::_Xlen(void)"
(?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(queue.obj) : error
LNK2001: unresolved external symbol "public: static void __cdecl
std::_String_base::_Xlen(void)"
(?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(algparam.obj) : error
LNK2001: unresolved external symbol "public: static void __cdecl
std::_String_base::_Xlen(void)"
(?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(mqueue.obj) : error
LNK2001: unresolved external symbol "public: static void __cdecl
std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ)
...
In this case, Visual Studio cannot find the library. First, make sure the libray is on path. Second, make sure you specify cryptlib.lib as an additional input.
Since you are using the pragma to include the library, I would expect that your project is not specifying its location. Under the project properties, inspect Linker -> General -> Additional Library Directories. You will need to specify the library directory for Debug and Release, x86 and x64.
Jeff
|
|
|
|

|
ok I am rebuilding crypto into the dynamic dll version. All 4 configuration rebuilt for dynamic dll version. Now, I have two folders: output and dll-output. Which files from which folder should I use for my ATL dynamic COM project? HR
|
|
|
|

|
ehaerim wrote: I am rebuilding crypto into the dynamic dll version. All 4
configuration rebuilt for dynamic dll version. Now, I have two folders:
output and dll-output.
Use output. dll-output is for the FIPS version of the library. The FIPS version of the library outputs a DLL to create a logical security boundary to help satisfy FIPS requirements.
Jeff
|
|
|
|

|
After building and following your advise, I still get huge number of linking errors It seems I will never make this work myself. Initially I was attracted to the author's assertion that the use of this library coudn't be simpler. Now it's really overwhelming. So, if you don't mind, I would love to send my ATL project (almost an empty project just for testing this killing crypto library) to your email. Or if you could build a sample atl com out-of-proc project for vc2010, that'd be also great. Just add the code from my initial post to see if things get compiled/linked and works as expected. Then send me the whole project along with the crypto source projects please. I would simply rebuild and add up my stuff to that. Could you give me your email please? thx a lot.
|
|
|
|

|
ehaerim wrote: It seems I will never make this work myself. Initially I was
attracted to the author's assertion that the use of this library coudn't be
simpler. Now it's really overwhelming.
Its not that hard. There are four things you must do:
1) Decide on Static/Dynamic runtime linking
If dynamic, change Crypto++ project to use dynamic linking
2) Add the Crypto++ headers path
Propeties: C/C++ -> General -> Additional Include Directories
Use 'Win32\Output' and 'x64\Output'
3) Add the Crypto++ library path
Properties: Linker -> General -> Additional Library Directories
4) Add the Crypto++ library
Properties: Linker -> Input -> Additional Dependencies
Jeff
|
|
|
|

|
Crypto++ V5.6.1 is extracted into a folder named CryptoPP(5.6.1). All .h and .cpp files are there. 1) Decide on Static/Dynamic runtime linking If dynamic, change Crypto++ project to use dynamic linking => am using dynamic and rebuilt Crypto++ for dynamic configuration => moved cryptlib.lib from win32/output/release to CryptoPP(5.6.1). => renamed cryptlib.lib from win32/output/debug to cryptlibd.lib and moved it to CryptoPP(5.6.1). Now all the .h/.cpp files and release/debug version of .lib files are located inside CryptoPP(5.6.1) folder. 2) Add the Crypto++ headers path Propeties: C/C++ -> General -> Additional Include Directories Use 'Win32\Output' and 'x64\Output' => headers path is specified as CryptoPP(5.6.1) and currently not using x64 but Win32 only. 3) Add the Crypto++ library path Properties: Linker -> General -> Additional Library Directories => libs path is specified as CryptoPP(5.6.1) 4) Add the Crypto++ library Properties: Linker -> Input -> Additional Dependencies => specified cryptlib.lib and cryptlibd.lib for release/debug, respectively.
I've just uploaded my atl project ftp://ftp1.investware.net:1250/Temp/InveServer(1.0.0.0)_Crypto(5.6.1)_Test.zip Would you please download and check it with CryptoPP V5.6.1? I've tried all the static/dynamic building and am completely exhausted building / rebuilding / getting different errors every time.
1>cryptlibd.lib(zinflate.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(gzip.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(queue.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(algparam.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(mqueue.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(cryptlib.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::append(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int,unsigned int)" (?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z) 1>cryptlibd.lib(crc.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(zdeflate.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(filters.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) 1>cryptlibd.lib(zinflate.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) referenced in function "public: class CryptoPP::HuffmanDecoder * __thiscall CryptoPP::NewFixedLiteralDecoder::operator()(void)const " (??RNewFixedLiteralDecoder@CryptoPP@@QBEPAVHuffmanDecoder@1@XZ) 1>cryptlibd.lib(gzip.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) 1>cryptlibd.lib(queue.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) 1>cryptlibd.lib(algparam.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) 1>cryptlibd.lib(mqueue.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) 1>cryptlibd.lib(cryptlib.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) 1>cryptlibd.lib(crc.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) 1>cryptlibd.lib(zdeflate.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) 1>cryptlibd.lib(filters.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ)
|
|
|
|

|
I was able to compile and link your project (some problems, such as DLL registration because of missing macros). Rather than using a G: drive (shared or mapped?), I used C:\CryptoPP(5.6.1).
Also, I did not perform the 'copy libraries to crypto++ root'. I just used C:\CryptoPP(5.6.1)\Win32\Output\Debug and C:\CryptoPP(5.6.1)\Win32\Output\Release.
I also removed the 'No default library' setting in your project. This could mask multiply defined symbols. Multiply defined symbols is usually a result of mixing static and dynamic runtime libraries (your project uses one, and Crypto++ uses another).
You are probably not using the proper C/C++ runtimes in the Crypto++ project. Fix the runtime library in 'cryptlib'. Fix it in Debug and Release. Don't worry about Dll-Import and Dll-Export since you are not using the FIPS DLL. And don't worry about it in other projects, such as 'dlltest'.
If you are certain you are using the proper runtime libraries, move Crypto++ *off* the shared drive to a local drive. I've seen funny things in the past when using libraries on shared drives, especially if the drive auto disconnects after an idle time period.
Jeff
modified 27 Nov '11 - 22:58.
|
|
|
|

|
G is neither shared nor mapped drive. It just happens to be G: rather than D:. I don't think moving libraries to the crypto++ root caused the linking issue, but I will try again from the output folder. You are probably not using the proper C/C++ runtimes in the Crypto++ project. Fix the runtime library in 'cryptlib'. => I don't understand what you mean. What should I fix for the runtime library? => If possible, could you could zip and upload the following to to my ftp? id/pw is jeff/jeffpw and the ip/port is ftp://ftp1.investware.net:1250. Then I can try it on my pc to see any difference. - the atl project I uploaded and you tested after modifiying to suit your environment - the crypto++ v5.6.1 project source and libraries you built under your environment
For your reference, I copy the settings information from the project: [1] Include Directories: C:\CryptoPP(5.6.1) $(VCInstallDir)include $(VCInstallDir)atlmfc\include $(WindowsSdkDir)include $(FrameworkSDKDir)\include [2] Library Directories: C:\CryptoPP(5.6.1) $(VCInstallDir)lib $(VCInstallDir)atlmfc\lib $(WindowsSdkDir)lib $(FrameworkSDKDir)\lib [3] Source Directories: C:\CryptoPP(5.6.1) $(VCInstallDir)atlmfc\src\mfc $(VCInstallDir)atlmfc\src\mfcm $(VCInstallDir)atlmfc\src\atl $(VCInstallDir)crt\src [4] Additional Dependencies: For Debug: kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;cryptlibd.lib For Release: kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;cryptlib.lib [5] Ignore Specific Default Libraries: LIBCMT / LIBCMTD for release/debug
I still get the link errors.
|
|
|
|

|
ehaerim wrote: => I don't understand what you mean. What should I fix for the runtime library?
You need to change Crypto++'s 'cryptlib' project to use the DLL version of the C/C++ runtime library.
ehaerim wrote: => If possible, could you could zip and upload the following to to my ftp?
Microsoft's command line ftp tool is lame - I cannot enter passive mode to perform the transfer. Sorry.
Jeff
|
|
|
|

|
You need to change Crypto++'s 'cryptlib' project to use the DLL version of the C/C++ runtime library. => done Now I get more different errors. What the heck should I do to make this linking succeed please? I am getting almost crazy now... Couldn't you just send me the atl project source files to my email (ehaerim@gmail.com). After zipping, it should be pretty small if you remove debug/release object files and so on. Please help. If you want, you can come to my desktop remotely via the free Teamviewer program.
1>cryptlib.lib(zinflate.obj) : warning LNK4217: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported in function __ehhandler$?FillCacheEntry@HuffmanDecoder@CryptoPP@@ABEXAAULookupEntry@12@I@Z 1>cryptlib.lib(gzip.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported 1>cryptlib.lib(queue.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported 1>cryptlib.lib(algparam.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported 1>cryptlib.lib(mqueue.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported 1>cryptlib.lib(cryptlib.obj) : warning LNK4217: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported in function "public: __thiscall CryptoPP::Algorithm::Algorithm(bool)" (??0Algorithm@CryptoPP@@QAE@_N@Z) 1>cryptlib.lib(crc.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported 1>cryptlib.lib(zdeflate.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported 1>cryptlib.lib(filters.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported 1>cryptlib.lib(zinflate.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported 1>cryptlib.lib(gzip.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported 1>cryptlib.lib(queue.obj) : warning LNK4217: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported in function "public: void * __thiscall CryptoPP::ByteQueueNode::`scalar deleting destructor'(unsigned int)" (??_GByteQueueNode@CryptoPP@@QAEPAXI@Z) 1>cryptlib.lib(algparam.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported 1>cryptlib.lib(mqueue.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported 1>cryptlib.lib(cryptlib.obj) : warning LNK4217: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported in function "public: __thiscall CryptoPP::Algorithm::Algorithm(bool)" (??0Algorithm@CryptoPP@@QAE@_N@Z) 1>cryptlib.lib(crc.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported 1>cryptlib.lib(zdeflate.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported 1>cryptlib.lib(filters.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported 1>cryptlib.lib(zinflate.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported 1>cryptlib.lib(gzip.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported 1>cryptlib.lib(queue.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported 1>cryptlib.lib(algparam.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported 1>cryptlib.lib(mqueue.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported 1>cryptlib.lib(cryptlib.obj) : warning LNK4217: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported in function "public: __thiscall CryptoPP::Exception::Exception(enum CryptoPP::Exception::ErrorType,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0Exception@CryptoPP@@QAE@W4ErrorType@01@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 1>cryptlib.lib(crc.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported 1>cryptlib.lib(zdeflate.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported 1>cryptlib.lib(filters.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported 1>cryptlib.lib(zinflate.obj) : warning LNK4217: locally defined symbol ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ (public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const ) imported in function "public: __thiscall CryptoPP::BufferedTransformation::BlockingInputOnly::BlockingInputOnly(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0BlockingInputOnly@BufferedTransformation@CryptoPP@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 1>cryptlib.lib(gzip.obj) : warning LNK4049: locally defined symbol ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ (public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const ) imported 1>cryptlib.lib(queue.obj) : warning LNK4049: locally defined symbol ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ (public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const ) imported 1>cryptlib.lib(algparam.obj) : warning LNK4049: locally defined symbol ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ (public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const ) imported 1>cryptlib.lib(mqueue.obj) : warning LNK4217: locally defined symbol ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ (public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const ) imported in function __ehhandler$?Detach@BufferedTransformation@CryptoPP@@UAEXPAV12@@Z 1>cryptlib.lib(cryptlib.obj) : warning LNK4217: locally defined symbol ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ (public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const ) imported in function "public: virtual char const * __thiscall CryptoPP::Exception::what(void)const " (?what@Exception@CryptoPP@@UBEPBDXZ) 1>cryptlib.lib(crc.obj) : warning LNK4049: locally defined symbol ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ (public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const ) imported 1>cryptlib.lib(zdeflate.obj) : warning LNK4049: locally defined symbol ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ (public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const ) imported 1>cryptlib.lib(filters.obj) : warning LNK4049: locally defined symbol ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ (public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const ) imported 1>cryptlib.lib(mqueue.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const *)" (__imp_??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z) 1>cryptlib.lib(zinflate.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const *)" (__imp_??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z) 1>cryptlib.lib(cryptlib.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const *)" (__imp_??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z) referenced in function "protected: void __thiscall CryptoPP::SimpleKeyingInterface::ThrowIfResynchronizable(void)" (?ThrowIfResynchronizable@SimpleKeyingInterface@CryptoPP@@IAEXXZ) 1>cryptlib.lib(zdeflate.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const *)" (__imp_??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z) 1>cryptlib.lib(filters.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const *)" (__imp_??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z) 1>cryptlib.lib(algparam.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const *)" (__imp_??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z) 1>cryptlib.lib(cryptlib.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@0@Z) referenced in function "protected: unsigned int __thiscall CryptoPP::SimpleKeyingInterface::ThrowIfInvalidIVLength(int)" (?ThrowIfInvalidIVLength@SimpleKeyingInterface@CryptoPP@@IAEIH@Z) 1>cryptlib.lib(filters.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,structstd::char_traits<char>,class std::allocator<char> > const &)" (__imp_??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@0@Z) 1>cryptlib.lib(zinflate.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(char const *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z) 1>cryptlib.lib(cryptlib.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(char const *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z) referenced in function "protected: void __thiscall CryptoPP::HashTransformation::ThrowIfInvalidTruncatedSize(unsigned int)const " (?ThrowIfInvalidTruncatedSize@HashTransformation@CryptoPP@@IBEXI@Z) 1>cryptlib.lib(zdeflate.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(char const *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z) 1>cryptlib.lib(filters.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(char const *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z) 1>cryptlib.lib(algparam.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(char const *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z) 1>cryptlib.lib(cryptlib.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::empty(void)const " (__imp_?empty@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE_NXZ) referenced in function "public: virtual unsigned char * __thiscall CryptoPP::BufferedTransformation::ChannelCreatePutSpace(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int &)" (?ChannelCreatePutSpace@BufferedTransformation@CryptoPP@@UAEPAEABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAI@Z) 1>cryptlib.lib(filters.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::empty(void)const " (__imp_?empty@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE_NXZ) 1>cryptlib.lib(cryptlib.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::operator=(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z) referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl CryptoPP::IntToString<int>(int,unsigned int)" (??$IntToString@H@CryptoPP@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HI@Z) 1>cryptlib.lib(zdeflate.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::operator=(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z) 1>cryptlib.lib(cryptlib.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(char,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DABV10@@Z) referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl CryptoPP::IntToString<int>(int,unsigned int)" (??$IntToString@H@CryptoPP@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HI@Z) 1>cryptlib.lib(zdeflate.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(char,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DABV10@@Z) 1>cryptlib.lib(cryptlib.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(struct std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Has_debug_it)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@U_Has_debug_it@01@@Z) referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl CryptoPP::IntToString<int>(int,unsigned int)" (??$IntToString@H@CryptoPP@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HI@Z) 1>cryptlib.lib(zdeflate.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(struct std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Has_debug_it)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@U_Has_debug_it@01@@Z) 1>cryptlib.lib(filters.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) bool __cdecl std::operator==<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z) referenced in function "public: virtual unsigned char * __thiscall CryptoPP::AuthenticatedEncryptionFilter::ChannelCreatePutSpace(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int &)" (?ChannelCreatePutSpace@AuthenticatedEncryptionFilter@CryptoPP@@UAEPAEABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAI@Z) 1>cryptlib.lib(mqueue.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) bool __cdecl std::operator==<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z) 1>cryptlib.lib(filters.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base@std@@QBEXXZ) referenced in function "public: void __thiscall std::deque<struct CryptoPP::MeterFilter::MessageRange,class std::allocator<struct CryptoPP::MeterFilter::MessageRange> >::push_back(structCryptoPP::MeterFilter::MessageRange const &)" (?push_back@?$deque@UMessageRange@MeterFilter@CryptoPP@@V?$allocator@UMessageRange@MeterFilter@CryptoPP@@@std@@@std@@QAEXABUMessageRange@MeterFilter@CryptoPP@@@Z) 1>cryptlib.lib(gzip.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base@std@@QBEXXZ) 1>cryptlib.lib(mqueue.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base@std@@QBEXXZ) 1>cryptlib.lib(zinflate.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base@std@@QBEXXZ) 1>cryptlib.lib(gzip.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ) referenced in function "public: __thiscall std::_Vector_val<struct CryptoPP::HuffmanDecoder::CodeInfo,class CryptoPP::AllocatorWithCleanup<struct CryptoPP::HuffmanDecoder::CodeInfo,0> >::~_Vector_val<struct CryptoPP::HuffmanDecoder::CodeInfo,class CryptoPP::AllocatorWithCleanup<struct CryptoPP::HuffmanDecoder::CodeInfo,0> >(void)" (??1?$_Vector_val@UCodeInfo@HuffmanDecoder@CryptoPP@@V?$AllocatorWithCleanup@UCodeInfo@HuffmanDecoder@CryptoPP@@$0A@@3@@std@@QAE@XZ) 1>cryptlib.lib(mqueue.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ) 1>cryptlib.lib(zinflate.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ) 1>cryptlib.lib(algparam.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::operator+=(char const *)" (__imp_??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z) referenced in function "public: bool __thiscall CryptoPP::AlgorithmParametersBase::GetVoidValue(char const *,class type_info const &,void *)const " (?GetVoidValue@AlgorithmParametersBase@CryptoPP@@QBE_NPBDABVtype_info@@PAX@Z) 1>cryptlib.lib(mqueue.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Swap_all(class std::_Container_base &)const " (__imp_?_Swap_all@_Container_base@std@@QBEXAAV12@@Z) referenced in function "public: void __thiscall std::deque<unsigned __int64,class std::allocator<unsigned __int64> >::swap(class std::deque<unsigned __int64,class std::allocator<unsigned __int64> > &)" (?swap@?$deque@_KV?$allocator@_K@std@@@std@@QAEXAAV12@@Z) 1>cryptlib.lib(mqueue.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ) referenced in function "protected: __thiscall std::_Deque_map<unsigned __int64,class std::allocator<unsigned __int64> >::_Deque_map<unsigned __int64,class std::allocator<unsigned __int64> >(class std::allocator<unsigned __int64>)" (??0?$_Deque_map@_KV?$allocator@_K@std@@@std@@IAE@V?$allocator@_K@1@@Z) 1>cryptlib.lib(zinflate.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ)
|
|
|
|

|
One question: Did you build the crypto library in VC2005 or VC2010? I used VC2005 because the v5.6.1 has a solution file for vc2005, not vc2010. Then I used the built libraries in my atl com project written in vc2010. And as you know, I got endless linking errors no matter what I did. So, I tried to rewrite my atl com project in vc2005 and did the same test. Now it compiles/links without any problem. So, I come to the conclusion that crypto library built in VC2005 won't work for a vc2010 project. Is this correct?
|
|
|
|

|
ehaerim wrote: ne question: Did you build the crypto library in VC2005 or VC2010?
When I tested your project, I used Visual Stusio 2010.
|
|
|
|

|
Forgot to mention.... Wei Dai fixed some things for VS2010, but they should *not* have precluded you from linking (I don't recall which revision). You can checkout from SVN with svn checkout https://cryptopp.svn.sourceforge.net/svnroot/cryptopp/trunk/c5 cryptopp .
|
|
|
|

|
Just so everyone knows, you don't have to fight the libs. Just integrate the Crypto++ static lib into dll with the same settings, write an API for the dll and export the API functions through a .def file (rather than integrated in the code using _declspec) and, in your application, use LoadLibrary() and GetProcAddress() to get the exported API functions.
m.bergman
-- For Bruce Schneier, quanta only have one state : afraid.
|
|
|
|

|
Hmmm... a 1 vote for a valid answer? How childish. And cowardly.
m.bergman
-- For Bruce Schneier, quanta only have one state : afraid.
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
|
Avoid common pitfalls when using Crypto++ and VC++.
| Type | Article |
| Licence | CPOL |
| First Posted | 14 Nov 2006 |
| Views | 224,033 |
| Bookmarked | 158 times |
|
|