I have a problem when compiling a DLL with the Digital Mars compiler.
The program compiles with no warnings or errors. It is compiled with the options:
dmc.exe -mn -c -x -WD -w-
and linked with the options:
link.exe /NOLOGO /DELEXECUTABLE /EXETYPE:NT /SUBSYSTEM:WINDOWS
The calling program uses explicit linking with LoadLibrary and GetProcAddress. Both of these functions execute without getting an error. But the DllMain function is never called. I put a messagebox in the DllMain function to verify this.
I tried this with the Borland and GNU GCC compilers. It worked OK with both. It must be something about the Digital Mars compiler. An option? Something I am omitting? Or is it just not executed with explicit linking?
Why isn't the DllMain function being called?
Any suggestions would be appreciated.