Linking C and D
Andrej Mitrovic
andrej.mitrovich at gmail.com
Wed Feb 27 08:20:41 PST 2013
On Wednesday, 27 February 2013 at 16:12:13 UTC, monarch_dodra
wrote:
> I'm trying to get the hello world of cross compiling working:
The short story is you can't link GCC and DMD object files on
win32 because DMD emits OMF, GCC emits COFF, these are
incompatible.
You might want to read this:
http://www.gamedev.net/blog/1140/entry-2254003-binding-d-to-c/
> But I get:
> OPTLINK (R) for Win32 Release 8.00.12
> Copyright (C) Digital Mars 1989-2010 All rights reserved.
> http://www.digitalmars.com/ctg/optlink.html
> test.obj Offset 00000H Record Type 004C
> Error 138: Module or Dictionary corrupt
> --- errorlevel 1
I think we should try to implement a check in Optlink so it
errors with a nicer "cannot link objects files in COFF format"
rather than what it does right now.
More information about the Digitalmars-d-learn
mailing list