Hi everyone
I am trying to link the static lib build of Crypto++ 5.51 built with
Visual Studio 2005 to a Managed Class Library (DLL). Has anyone else
tried to link a static version of Crypto++ to a VS2005 managed C++
class? If so, I was hoping someone could help me resolve the linking
issues I am having.
I am including Crypto++ as follows into a simple DLL created from the
project wizard:
// test.h
#pragma once
// Crypto++
#define CRYPTOPP_DEFAULT_NO_DLL
#include "default.h"
#include "base64.h"
#include "osrng.h"
#include "rsa.h"
using namespace CryptoPP;
// Managed C++
using namespace System;
namespace test {
public ref class Class1
{
// TODO: Add your methods for this class here.
};
}
The linker reports lots of conflicts with libcmt and mscvrt however I
can resolve these by adding /FORCE:MULTIPLE to the linker command line
properties. The only linking issue I cannot solve is this:
LIBCMTD.lib(crt0.obj) : error LNK2019: unresolved external symbol
_main referenced in function ___tmainCRTStartup
What in Crypto++ is running int main(...)? I realise as well that
Crypto++ is built is a non-Unicode project and the Managed DLL is
built with Unicode libraries, so the true entry point is the Unicode
main function. If I define a main function I get some interesting
errors when loading the DLL from tester applications.
Another option I have tried is to use the DLL build of Crypto++. I
have had more luck with this, although there are some odd problems I
have had with the Base64 encoder when it is destroyed which I think
had to do with using the wrong delete operator pointer. But that is
probably something for a seperate post!
Any help would be appreciated!
Many thanks
Mark
--~--~---------~--~----~------------~-------~--~----~
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.
-~----------~----~----~----~------~----~------~--~---