Linking C and D
monarch_dodra
monarchdodra at gmail.com
Wed Feb 27 08:50:18 PST 2013
On Wednesday, 27 February 2013 at 16:37:06 UTC, Alexandr
Druzhinin wrote:
> 27.02.2013 23:12, monarch_dodra пишет:
>> I can't seem to get the executable to link correctly.
>>
>> I'm using gcc and dmd on windows.
>>
>> I'm building foo.c with:
>> gcc -c foo.c -o foo.obj
>>
>> Then I build my exe with:
>> dmd foo.obj main.d
>>
>> 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
>>
>> ...Help ?
> Under Windows I use dmc + dmd and gdc + gcc - all these
> combinations work fine. But I only tested it on simple and
> small files.
> There is also unilink (ftp://ftp.styx.cabel.net/pub/UniLink/) -
> they say it can link together omf and coff, but I don't try it
TY. dmc works. Unfortunatly, I'm actually doing this to compile
"font" files into my D project. They can reach 2_000_000 lines,
and weight in at over 100Mo of code. dmc seems to choke on these:
//----
nbytes = 102000, ph_maxsize = 65520
Internal error: ph.c 1854
//----
dmc seems to start choking when my font files start to reach
about 15 Mo.
I suppose there's a switch somewhere, but I've never used dmc
before, so all the switches are unknown to me. I guess I'll just
have to learn (anybody know?).
If worst comes to worst, I can try to split the font files, but
since they are tool generated, I really shouldn't be touching
them.
More information about the Digitalmars-d-learn
mailing list