www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - GDC for dummies

reply bearophile <bearophileHUGS lycos.com> writes:
Time again to ask 'dumb' questions (maybe it's just a problem of searching
paths).

So far I have failed in the install of GDC (despite already having MinGW
correctly working, I use it quite often), so I have followed the instructions.

This page:
http://gdcwin.sourceforge.net/

Says:
"You need to have regular Minimalist GNU for Windows already installed,"

So I have used this online installer (to install it again ;-) ):
http://surfnet.dl.sourceforge.net/sourceforge/mingw/MinGW-5.1.3.exe
I have chosen to download the make and the C++ compiler.

Even if it's an ugly path, to avoid possible (silly) problems I have accepted
its suggested path:
C:\MinGW

(I have seen that it adds nothing to the path variable, that's probably wrong
for such installer).

Then I have installed this:
http://prdownloads.sourceforge.net/gdcwin/gdc-0.24-gcc-3.4.5.exe

Installed in:
C:\languages\D\GDC

Again I can't see path variable updated, nor any bat file that updates it on
the fly for a specific shell. So what ambient variables do I have to set, and
what paths I do have to add to the 'path' variable to make gdc work? I can't
see docs or helps that list them.

(I have no Perl installed yet, I usually use Python because it's better for
most things, but I may end installing ActivePerl too if it's useful).

I have tried to add most things to the path:

PATH=C:\MinGW;C:\MinGW\bin;C:\MinGW\lib;C:\languages\D\GDC;C:\languages\D\GDC\lib;C:\languages\D\GDC\bin;C:\WINNT;C:\MinGW\lib\gcc\mingw32\3.4.5;

Then I have tried to compile a tiny D Fibonacci program:
gdc fib.d -o fib

But it can't find this:
ld: crtbegin.o: No such file: No such file or directory

Note that crtbegin.o is currently here, in the path:
C:\MinGW\lib\gcc\mingw32\3.4.5

Detailed suggestions are very welcome. If you need more info about the system I
can give it too.

Bye,
bearophile
Nov 24 2007
next sibling parent Bill Baxter <dnewsgroup billbaxter.com> writes:
bearophile wrote:
 Time again to ask 'dumb' questions (maybe it's just a problem of searching
paths).
 
 So far I have failed in the install of GDC (despite already having MinGW
correctly working, I use it quite often), so I have followed the instructions.
 
 This page:
 http://gdcwin.sourceforge.net/
 
 Says:
 "You need to have regular Minimalist GNU for Windows already installed,"
 
 So I have used this online installer (to install it again ;-) ):
 http://surfnet.dl.sourceforge.net/sourceforge/mingw/MinGW-5.1.3.exe
 I have chosen to download the make and the C++ compiler.
 
 Even if it's an ugly path, to avoid possible (silly) problems I have accepted
its suggested path:
 C:\MinGW
 
 (I have seen that it adds nothing to the path variable, that's probably wrong
for such installer).
 
 Then I have installed this:
 http://prdownloads.sourceforge.net/gdcwin/gdc-0.24-gcc-3.4.5.exe
 
 Installed in:
 C:\languages\D\GDC
 
 Again I can't see path variable updated, nor any bat file that updates it on
the fly for a specific shell. So what ambient variables do I have to set, and
what paths I do have to add to the 'path' variable to make gdc work? I can't
see docs or helps that list them.
 
 (I have no Perl installed yet, I usually use Python because it's better for
most things, but I may end installing ActivePerl too if it's useful).
 
 I have tried to add most things to the path:
 
 PATH=C:\MinGW;C:\MinGW\bin;C:\MinGW\lib;C:\languages\D\GDC;C:\languages\D\GDC\lib;C:\languages\D\GDC\bin;C:\WINNT;C:\MinGW\lib\gcc\mingw32\3.4.5;
 
 Then I have tried to compile a tiny D Fibonacci program:
 gdc fib.d -o fib
 
 But it can't find this:
 ld: crtbegin.o: No such file: No such file or directory
 
 Note that crtbegin.o is currently here, in the path:
 C:\MinGW\lib\gcc\mingw32\3.4.5
 
 Detailed suggestions are very welcome. If you need more info about the system
I can give it too.
 
 Bye,
 bearophile

I dunno but I would think you'd put lib dirs in a LIB or LIBPATH variable, rather than PATH. Still I'm surprised that it's not finding lib files by default. The mingw installs I've used seem to have the lib path hard-coded into them somehow so that they don't work unless they're in C:\MinGW. So installing it there is probably the right thing to do. I've never made a serious effort to get MinGW GDC working, though. --bb
Nov 24 2007
prev sibling parent =?UTF-8?B?IkrDqXLDtG1lIE0uIEJlcmdlciI=?= <jeberger free.fr> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

bearophile wrote:
 So I have used this online installer (to install it again ;-) ):
 http://surfnet.dl.sourceforge.net/sourceforge/mingw/MinGW-5.1.3.exe
 I have chosen to download the make and the C++ compiler.
 
 Even if it's an ugly path, to avoid possible (silly) problems I have accepted
its suggested path:
 C:\MinGW
 
 (I have seen that it adds nothing to the path variable, that's probably wrong
for such installer).
 
 Then I have installed this:
 http://prdownloads.sourceforge.net/gdcwin/gdc-0.24-gcc-3.4.5.exe
 
 Installed in:
 C:\languages\D\GDC
 

want (although it's probably best to avoid spaces in the path), but you *must* install gdc to the *same* folder. Then add c:\mingw\bin to the path if it didn't do it (can't remember, it's been a while since I installed it), and you should be set. There should be no need to set any other environment variable (at least, I didn't and it works for me). Jerome - -- +------------------------- Jerome M. BERGER ---------------------+ | mailto:jeberger free.fr | ICQ: 238062172 | | http://jeberger.free.fr/ | Jabber: jeberger jabber.fr | +---------------------------------+------------------------------+ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHSx5bd0kWM4JG3k8RAr/KAJsFinMc0IMMK82npLsHMfdsgheOLgCfW8OV WGEA28cItOJMPKQUQg4IS3M= =iDmT -----END PGP SIGNATURE-----
Nov 26 2007