Code::Blocks Forums

User forums => Help => Topic started by: creatxr on April 16, 2007, 11:03:00 am

Title: compile D program error
Post by: creatxr on April 16, 2007, 11:03:00 am
I created a D program and tried to compile it .. (using GDC)
but it's error.
I saw the project's build options . in "search directories 's -> linker" it has already a path " E:\MinGW\lib"


-------------- Build: Debug in DDD ---------------
Linking console executable: bin\Debug\DDD.exe
E:\MinGW\bin\ld.exe: crt2.o: No such file: No such file or directory
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
 
Title: Re: compile D program error
Post by: Biplab on April 16, 2007, 11:11:18 am
Can you compile a D program with MinGW?? AFAIK, the answer is No. So why are you using MinGW to compile and link it??

Use appropriate compiler and the problem should be solved.
Title: Re: compile D program error
Post by: wxLearner on April 16, 2007, 11:36:05 am
Can you compile a D program with MinGW??
Yes, you can.
Quote from: http://dgcc.sourceforge.net/ (http://dgcc.sourceforge.net/)
GDC works with GCC versions 3.3.x, 3.4.x, and 4.0.x.

    * Linux (tested on Fedora Core 5 x86 and PowerPC)
    * Mac OS X 10.3.x, 10.4.x
    * FreeBSD 5.2.1
    * Cygwin
    * MinGW
    * AIX (tested on 5.1)
It's compiled for MinGW gcc-3.4.5 and it works good with this version, but it doesn't work with the DW2-EH enabled gcc-3.4.5.
Title: Re: compile D program error
Post by: Biplab on April 16, 2007, 11:56:00 am
Yes, you can.

Thanks for the link. :)
Title: Re: compile D program error
Post by: creatxr on April 16, 2007, 01:49:11 pm
I use MinGW current version ( gcc-3.4.2 etc.)

Is there anything else that needed to configure ?
Title: Re: compile D program error
Post by: Biplab on April 16, 2007, 01:53:06 pm
Did you install MinGW Runtime Package? If Not, please install it. :)
Title: Re: compile D program error
Post by: stahta01 on April 16, 2007, 02:20:23 pm
It's compiled for MinGW gcc-3.4.5 and it works good with this version, but it doesn't work with the DW2-EH enabled gcc-3.4.5.

Most likely you need to recompile GDC using DW2-EH before it will work.
Mixing DW2-EH and the other method used by normal MinGW GCC do NOT mix well.

Tim S
Title: Re: compile D program error
Post by: creatxr on April 16, 2007, 07:33:52 pm
I found the problem.
I've to extract file "gdc-0.23-mingw32-gcc-3.4.5.tar.bz2" to MinGW 's home.
although, even if I 've set GDC 's search diretories and additional paths, it does not work.

but why? cound it be thought as a bug?

[attachment deleted by admin]
Title: Re: compile D program error
Post by: stahta01 on April 16, 2007, 07:45:27 pm
I found the problem.
I've to extract file "gdc-0.23-mingw32-gcc-3.4.5.tar.bz2" to MinGW 's home.
although, even if I 've set GDC 's search diretories and additional paths, it does not work.

but why? cound it be thought as a bug?

No, it is NOT a bug, it is how you must install gdc for it to work. At least, an year ago it was how I read you had to install it.
Note, back them I read you have to install it into c:\MinGW for it to work even, but that did not seem to be needed.

Tim S
Title: Re: compile D program error
Post by: creatxr on April 16, 2007, 08:03:48 pm
I think that it should find the libs after I set the directories .
but it can't.
so I think it's a bug.
Title: Re: compile D program error
Post by: stahta01 on April 16, 2007, 08:37:49 pm
I think that it should find the libs after I set the directories .
but it can't.
so I think it's a bug.

I do agree that it is a Documentation issue, but I do NOT think it is a software bug.
It would be nice if it works the way you want, but it might not be easy to do it.

Tim S
Title: Re: compile D program error
Post by: afb on April 16, 2007, 11:11:31 pm
No, it is NOT a bug, it is how you must install gdc for it to work. At least, an year ago it was how I read you had to install it.
Note, back them I read you have to install it into c:\MinGW for it to work even, but that did not seem to be needed.

Eventually it was figured out: D.gnu:2252 (http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=D.gnu&artnum=2252) "Compiler relocation with MinGW"