Spoerr Mathias <
mathias@...> writes:
>I use cryptlib for a long time with MFC. Now I want to port my application to
>wxwidgets and get the following error when building the project:
>
>"cryptlib.h and wincrypt.h can't both be used at the same time due to
>conflicting type names"
>
>I found the following thread on this list which describes the same problem:
>
>
http://search.gmane.org/search.php?group=gmane.comp.encryption.cryptlib&query=wxwidgets>
>Is there any known solution for this issue?
The resolution's still the same as last time:
My guess is that wxWidgets 2.6.3 pulls in wincrypt.h in some way, this can't
be used at the same time as cryptlib because wincrypt.h uses proprocessor
defines with the same name as cryptlib ones (although cryptlib used them
first :-). You'd have to find out where/how wincrypt.h is being pulled in
and then see how to exclude it, without access to the wxWidgets tools it's
hard for me to tell what the fix is.
The way to do this is to remove the #error directive from cryptlib.h (line 44)
and see which defines conflict, then #undef them after the include of
<windows.h> (line 40), if you can make the changes in the form:
#ifdef __WXWINDOWS__
#undef <whatever>
#endif /* __WXWINDOWS__ */
then I'll roll them into future versions of cryptlib. My guess is that:
#undef CRYPT_MODE_ECB
#undef CRYPT_MODE_CBC
#undef CRYPT_MODE_CFB
#undef CRYPT_MODE_OFB
may be enough, but I don't use wxWidgets so I don't know what CryptoAPI
capabilities it enables.
Peter.
_______________________________________________
Cryptlib mailing list
Cryptlib@... via Mail:
cryptlib-request@...
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlibPosts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.