www.digitalmars.com         C & C++   DMDScript  

c++ - Please help. dmc/olink produce incompatible import lib


I'd prefer very much to produce import-lib and dll with dmc and 
olink for VC++ projects.

It is strange for me, that the obj file is smaller than with 
other compilers.
The lib file misses some information, too, that you can see when 
comparing with different linkers, e.g. /arch

When using resulting lib and import lib in VC++ and link that 
project the linker complains: "lib file: invalid or corrupt file.

dmc command I use:

dmc source.cpp -cpp -c -Wd -mn -r  -DWIN32 -D_WINDOWS -D_USRDLL 

olink command:

olink source.obj, dllsample.dll,, user32.lib kernel32.lib, 
dllsample.def /EXETYPE:NT /IMPLIB:"dllsample.lib" /noi 

Thank You very much
Jan 11