libgcrypt, libgpg-error shared/dynamic libs under MinGW

terrence at trainedmonkeystudios.org terrence at trainedmonkeystudios.org
Fri Sep 9 19:53:30 CEST 2005


Jim,

Remember that in Windows there is no concept of a dynamic code library. 
Dll's have an entry point that must be present.  This is the same error as
"missing main" in a program, only for the dll entry point DllMain.  See
this for an explanation:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdkintro/sdkintro/calling_the_c_run_time_library_from_a_dll.asp

And this for a detailed description of the callback:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/dllmain.asp

For libgcrypt, this will just be a blank function, so you'll probably just
want to put a block like this somewhere convenient:

#ifdef WIN32
BOOL WINAPI DllMain( HINSTANCE hinstDLL,
                     DWORD fdwReason,
                     LPVOID lpReserved )
{
}
#endif

-Terrence Cole
www.trainedmonkeystudios.org

p.s. I'll see what would be involved in supporting the native VC6 compiler
at some point.






More information about the Gcrypt-devel mailing list