|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
problem about using "CryptoPP" library in a CSP(Cryptographic Service Provider)Hello! I'm implementing a Smart Card CSP(Cryptographic Service Provider). but I've not used of Windows Cryptographic Functions(in "wincrypt.h"),I've add "CryptoPP 5.5.2" library to my CSP for cryptographic operations. (I downloaded "CSPDK" package of microsoft site and I use of Visual C+ + 2008;) My custom cryptographic codes are all ready,but I have several problems in final building and producing csp.dll and csp.lib files! I add the "CryptoPP" library and it's necessary header files to my CSP project,but when compiling it,I get 102 confusing errors which some of them are here: ------ Build started: Project: csp, Configuration: Debug Win32 ------ Compiling... csp.c d:\cryptopp\config.h(102) : error C2061: syntax error : identifier 'CryptoPP' d:\cryptopp\config.h(102) : error C2059: syntax error : ';' d:\cryptopp\config.h(102) : error C2449: found '{' at file scope (missing function header?) d:\cryptopp\config.h(161) : error C2059: syntax error : '}' e:\microsoft visual studio 9.0\vc\include\cstdio(39) : error C2143: syntax error : missing '{' before ':' e:\microsoft visual studio 9.0\vc\include\cstdio(39) : error C2059: syntax error : ':' e:\microsoft visual studio 9.0\vc\include\cstdio(41) : error C2143: syntax error : missing '{' before ':' e:\microsoft visual studio 9.0\vc\include\cstring(19) : error C2143: syntax error : missing '{' before ':' e:\microsoft visual studio 9.0\vc\include\cstring(19) : error C2059: syntax error : ':' e:\microsoft visual studio 9.0\vc\include\cstring(19) : error C2143: syntax error : missing '{' before ':' I really don't know,how should I remove these errors! meanwhile,additional codes needed for adding "CryptoPP", are entered in "cspdk.h" as following: // Crypto++ Includes #include "rsa.h" #include "osrng.h" #include "queue.h" #include "secblock.h" #include "sha.h" #include "hex.h" #include "filters.h" // Crypto++ Library #ifdef _DEBUG # pragma comment ( lib, "cryptlibd" ) #else # pragma comment ( lib, "cryptlib" ) #endif using namespace std; using namespace CryptoPP; Do you have any suggestion to give me? I need so help and have no much time,please help me!! Thanks in Advance. Gary --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to cryptopp-users-unsubscribe@.... More information about Crypto++ and this group is available at http://www.cryptopp.com. -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: problem about using "CryptoPP" library in a CSP(Cryptographic Service Provider)On Wed, May 27, 2009 at 9:36 AM, Gary <b.rostamiyan@...> wrote: > > Hello! > > I'm implementing a Smart Card CSP(Cryptographic Service Provider). > but I've not used of Windows Cryptographic Functions(in > "wincrypt.h"),I've add "CryptoPP > 5.5.2" library to my CSP for cryptographic operations. > > (I downloaded "CSPDK" package of microsoft site and I use of Visual C+ > + 2008;) > > My custom cryptographic codes are all ready,but I have several > problems in final building > and producing csp.dll and csp.lib files! > > I add the "CryptoPP" library and it's necessary header files to my CSP > project,but when > compiling it,I get 102 confusing errors which some of them are here: > > ------ Build started: Project: csp, Configuration: Debug Win32 ------ > Compiling... > csp.c > d:\cryptopp\config.h(102) : error C2061: syntax error : identifier > 'CryptoPP' that as C, not C++, therefore including C++ code will break the parser/compiler. You'll want to rename csp.c -> csp.cpp (and make sure any symbols being exported are properly marked extern "C" (and the like) -- Thomas Harning Jr. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to cryptopp-users-unsubscribe@.... More information about Crypto++ and this group is available at http://www.cryptopp.com. -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: problem about using "CryptoPP" library in a CSP(Cryptographic Service Provider)Hi Thomas and Thank you very much! I changed csp.c->csp.cpp and those errors have been removed; but now I have a link error about "autoreg.cpp" file which is here: autoreg.obj : error LNK2001: unresolved external symbol _g_hModule F:\csp\Debug\csp.dll : fatal error LNK1120: 1 unresolved externals Could you guide me again how I can remove this error? Meanwhile,because my Csp is a Smart Card CSP,I uncomment "#define SCARD_CSP" line in autoreg.cpp,and add "winscard.lib" to my project, Do you have any experience about using and working with "autoreg.cpp" in CSPDK? I posted my questions about this to Microsoft discussions but no one helped me,so I had to ask you here?!! Please help me again, Best Regards. Gary On May 27, 6:20 pm, "Thomas Harning Jr." <harni...@...> wrote: > On Wed, May 27, 2009 at 9:36 AM, Gary <b.rostami...@...> wrote: > > > Hello! > > > I'm implementing a Smart Card CSP(Cryptographic Service Provider). > > but I've not used of Windows Cryptographic Functions(in > > "wincrypt.h"),I've add "CryptoPP > > 5.5.2" library to my CSP for cryptographic operations. > > > (I downloaded "CSPDK" package of microsoft site and I use of Visual C+ > > + 2008;) > > > My custom cryptographic codes are all ready,but I have several > > problems in final building > > and producing csp.dll and csp.lib files! > > > I add the "CryptoPP" library and it's necessary header files to my CSP > > project,but when > > compiling it,I get 102 confusing errors which some of them are here: > > > ------ Build started: Project: csp, Configuration: Debug Win32 ------ > > Compiling... > > csp.c > > d:\cryptopp\config.h(102) : error C2061: syntax error : identifier > > 'CryptoPP' > > Off the top of my head... it's a ".c" file ... windows will compile > that as C, not C++, therefore including C++ code will break the > parser/compiler. You'll want to rename csp.c -> csp.cpp (and make > sure any symbols being exported are properly marked extern "C" (and > the like) > -- > Thomas Harning Jr. You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to cryptopp-users-unsubscribe@.... More information about Crypto++ and this group is available at http://www.cryptopp.com. -~----------~----~----~----~------~----~------~--~--- |
| Free embeddable forum powered by Nabble | Forum Help |