[botan-devel] Error Compiling Botan with VS2008 and unicode character project setting

tobeki at gmx.de tobeki at gmx.de
Mon Dec 12 15:54:35 EST 2011


Hi all,

I get this compile error in dyn_load.cpp when Botan tries to call LoadLibrary:

#elif defined(BOTAN_TARGET_OS_HAS_LOADLIBRARY)
lib = ::LoadLibrary(lib_name.c_str());

I guess LoadLibrary calls internally LoadLibraryW with std:string, so it fails?
If I do something like this it will work with both configurations (ASCII/Unicode):

...
#elif defined(BOTAN_TARGET_OS_HAS_LOADLIBRARY)

#if defined UNICODE
lib = ::LoadLibrary(reinterpret_cast<LPCWSTR>(lib_name.c_str())); // or LoadLibraryW
#else
lib = ::LoadLibrary(lib_name.c_str()); // or LoadLibraryA
#endif 
...

What can I do to use unicode configuration with Botan in my VC++ project?
Is it possible to deactivate the dynamic load engine module by “python configure.py...” ?

Thanks,
Tobias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.randombit.net/pipermail/botan-devel/attachments/20111212/7e93d789/attachment.html>


More information about the botan-devel mailing list