www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

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

↑ ↓ ← 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
↑ ↓ → 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