On 6 January 2012 21:06, Nick Sabalausky <[email protected]> wrote: > Yea, OMF is actually #1 PITA on Windows right now, unfortunately. > > The problem: On windows, DMD uses the Optlink linker. Optlink only supports > OMF right now (OMF used to be commonly used by Borland, IIRC). Optlink was > written entirely in asm so changing it is difficult. But Walter has been, > piece-by-piece, porting it to C (and then he'll port it to D). (This is > issue also happens to be the main thing blocking 64-bit on Windows.) >
Lame. Surely Optlink is not the only linker in the world...? I'm also surprised that someone capable of writing a compiler and optimiser for a complex language isn't capable of writing a linker. The link must surely be the simplest+easiest of those 3 jobs...? > There are a few solutions right now (in no particular order): > > - Recompile the libs using DMC (the Digital Mars C/C++ compiler). That will > result in an OMF lib file that can be used with DMD. > DMx has inferior code generation, not a chance :) .. And does DMC even support all the features of the language? SSE? No support in D, why would it work in DMC? > - Link with Unilink instead of DMD/Optlink. Unilink can link both OMF and > COFF together just fine. I don't have a link offhand, and it's a little > funky to learn how to use since the docs aren't very good, but I'm sure > someone here will chime in (or you can search the archives, I know comeone > posted a good introduction to it not too long ago). > Why not use this instead of Optlink if it works? I'll check it out... though VisualD doesn't support this. > - Use the Digital Mars COFF2OMF tool to convert to lib to OMF. > Unfortunately, the tool isn't free, but IIRC it's inexpensive. > Seriously... I just simply won't bother, and write my app in C instead ;) > - Use LDC or GDC instead of DMD. I think those work with COFF. > VisualD doesn't support those compilers (yet). - If the library comes in a DLL version, you can download the free IMPLIB > tool and use it to generate an OMF import library directly from the DLL > (it'll still actually link to the DLL at runtime). > I could probably build my engine as a DLL... I've been planning to do this for a long time anyway. Maybe this is the extra bit of motivation I need to do it ;) > The IMPLIB and COFF2OMF tools are here: > http://www.digitalmars.com/download/freecompiler.html IMPLIB is in the > free > "Basic Utilities" package, and COFF2OMF is in the "Extended Utilities > Package" > > If you feel this is all still a big pain in the ass: Don't worry, everyone > here agrees with you, and the situation will not remain like this forever. > Indeed. The main reason for my post is just to complain, and add my voice ;) I'd like to insist that this is basically unacceptable... it should be prioritised.
