<div class="gmail_quote">On 7 January 2012 11:37, Don <span dir="ltr"><<a href="mailto:nospam@nospam.com">nospam@nospam.com</a>></span> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 06.01.2012 21:02, Adam Wilson wrote:<br>
</div><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Fri, 06 Jan 2012 10:27:58 -0800, Manu <<a href="mailto:turkeyman@gmail.com" target="_blank">turkeyman@gmail.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Okay, so I was trying to link to a C lib, and I realised... DMD doesn't<br>
support/produce VS compatible libs.<br>
I should have realised this sooner, noting the cv debuginfo.<br>
<br>
So like... WTF?<br>
<br>
How am I supposed to use DMD in Windows in anything other than trivial,<br>
self-contained programs?<br>
VisualC is the de facto standard in Windows. All libs are COFF, and<br>
(unless<br>
I'm working with GCC) everything I want to link to is produced from VC.<br>
<br>
Let's also mention the debug info... Virtually every 3rd party tool<br>
assumes<br>
and/or works best with PDB debug info. Being required to run cv2pdb is<br>
pretty lame.<br>
<br>
So... why no support for COFF libs, and PDB debug info?<br>
Surely at least a compiler option would do the business if there is some<br>
kinky attachment to CV and OMF :/<br>
<br>
I was hoping to start a project using D as a front end language<br>
interacting<br>
with my C/C++ engine lib... but I can't.<br>
... and now that I think if it... how do ANY programs built with DMD<br>
actually work? .. How does it link to system32.lib, user32.lib, etc?<br>
</blockquote>
<br>
DMD on Linux gets ELF with x64 support.<br>
DMD on OSX gets Mach-O with x64 support.<br>
DMD on Windows gets ... OMF with no x64 support.<br>
<br>
COFF is an absolute requirements when working on Windows, yet DMD<br>
doesn't support it. Everything, every programming interface, every<br>
application running on x64 Windows is built with COFF, the default<br>
output of every other compiler on Windows is COFF, everyone else<br>
programming on Windows is expecting COFF.<br>
Windows represents the largest OS install base in the world; and yet,<br>
Windows based D programmers are told that they have to dig up extremely<br>
esoteric tools from the darkest, smelliest, most cobwebbed corners of<br>
the Internet, just to be able to interact with the the rest of the<br>
Windows world.<br>
<br>
This situation is simply unacceptable.<br>
<br>
Everything else on Windows is COFF, if DMD ever wants to be accepted as<br>
a mainstream Windows development tool, it simply *MUST* support COFF.<br>
And no amount of wishing will ever change this. Without COFF, D will<br>
ALWAYS be hamstrung on Windows, even if OMF ever got x64 support. Every<br>
other platform that DMD supports got their native object formats. It is<br>
now time to get the native Windows format in D.<br>
<br>
All DMD needs to do is output the COFF files, any number of linkers<br>
available on Windows can handle it from there. It doesn't have to<br>
replace OMF and it doesn't even have to be the default option, but it<br>
absolutely MUST be AN option.<br>
<br>
</blockquote>
<br></div></div>
>From everything I've seen, COFF seems to be very closely related to ELF. A large part of it is identical.<br>
In the old DDL project on dsource, a lot of work was done in deciphering the formats. COFF is a lot better documented than Mach-O.<br>
<br>
IMHO we should be looking at adding COFF output to the compiler, not to the linker.<br></blockquote><div><br></div><div>Definitely. I'd be happy/prefer to use VisualC's linker if the D objects/libs were compatible.</div>
</div>