digitalmars.D - Linking DMD D objects together with Cygwin GCC
- Simon (5/5) Nov 05 2008 I'm trying to link DMD D objects together with Cygwin GCC objects. I con...
- Jarrett Billingsley (5/10) Nov 05 2008 Converting object files from one format to another is a "cross your
- TomD (4/4) Nov 05 2008 You may try objconv from www.agner.org/optimize
- Don (7/13) Nov 06 2008 It probably doesn't work with DMD obj files yet. An update will be
- Simon (3/5) Nov 11 2008 I found the current GDC buggy (see the open bug list) and the developing...
I'm trying to link DMD D objects together with Cygwin GCC objects. I convert DMD OMF to COFF using link.exe -edit. I use gphobos as runtime library. Problem: When I declare a class in D, linking fails due to not resolved symbols like _Object7__ClassZ I tried to convert DMD phobos lib to coff (using link.exe), but this failed at stream.obj, which had too many ?? sections. All other files went fine. I must use the GCC linker, so what can I do to get the DMD phobos lib in COFF?
Nov 05 2008
On Wed, Nov 5, 2008 at 8:17 AM, Simon <werbungsfilter arcor.de> wrote:I'm trying to link DMD D objects together with Cygwin GCC objects. I convert DMD OMF to COFF using link.exe -edit. I use gphobos as runtime library. Problem: When I declare a class in D, linking fails due to not resolved symbols like _Object7__ClassZ I tried to convert DMD phobos lib to coff (using link.exe), but this failed at stream.obj, which had too many ?? sections. All other files went fine. I must use the GCC linker, so what can I do to get the DMD phobos lib in COFF?Converting object files from one format to another is a "cross your fingers" situation at best. You'd probably be better off using GDC for Windows. It uses MinGW and outputs the same COFF objects that Cygwin's GCC uses.
Nov 05 2008
You may try objconv from www.agner.org/optimize And then cross your fingers. Ciao Tom
Nov 05 2008
TomD wrote:You may try objconv from www.agner.org/optimize And then cross your fingers. Ciao TomIt probably doesn't work with DMD obj files yet. An update will be released in a couple of days, which includes some changes I made, to allow asm output from DMD obj files. Agner's made other improvements, but I don't know what they are yet. But it still probably can't convert DMD obj's to coff format. Worth a try through.
Nov 06 2008
You'd probably be better off using GDC for Windows. It uses MinGW and outputs the same COFF objects that Cygwin's GCC uses.I found the current GDC buggy (see the open bug list) and the developing progress is quite slow, not many updates not even once in 2008. So I try to stick with DMD. I hope they can switch to COFF someday. Until then I try to convert the object files. It works fine until I use classes.
Nov 11 2008