www.digitalmars.com         C & C++   DMDScript  

c++.windows.32-bits - Use DMC DLL in VC++

reply Jesse H. <Jesse_member pathlink.com> writes:
I made a dll in dmc and tested it dmc. Everything is ok. I need to use this dll
in VC++, but I got a linking error "fatal error LNK1136: invalid or corrupt
file". Can anyone help? TIA.
Jun 12 2006
parent Scott Michel <scottm aero.org> writes:
Jesse H. wrote:
 I made a dll in dmc and tested it dmc. Everything is ok. I need to use this dll
 in VC++, but I got a linking error "fatal error LNK1136: invalid or corrupt
 file". Can anyone help? TIA.
The answer is not "ABI" but file format. It's not necessarily corrupt; DMARS uses the (older) OMF object file format and produces output files that have OMF symbol information. That said, though, a DLL is a DLL is a DLL under Win32, irrespective of the object file format. So you shouldn't have a problem loading and executing the DLL in a program. If you're linking using the import library (which you **should** be), it's possible that the newer MS linkers can't handle reading OMF-style import libraries. If you're linking using the DLL, well, you shouldn't.
Jun 13 2006