delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/12/25/17:45:17

From: Andrew Cottrell <andnews AT ihug DOT com DOT oz DOT au>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: help: ld.exe: cannot find -lgcc
Date: Thu, 26 Dec 2002 09:30:53 +1100
Organization: ECLiPSE
Lines: 53
Message-ID: <ojbk0vs73pmng24v9c7mu77rmo5hsonruo@4ax.com>
References: <aud7cl$6c3tt$1 AT ID-57378 DOT news DOT dfncis DOT de>
NNTP-Posting-Host: p5-max19.syd.ihug.com.au
Mime-Version: 1.0
X-Trace: lust.ihug.co.nz 1040855455 18510 203.173.153.69 (25 Dec 2002 22:30:55 GMT)
X-Complaints-To: abuse AT ihug DOT co DOT nz
NNTP-Posting-Date: Wed, 25 Dec 2002 22:30:55 +0000 (UTC)
X-Newsreader: Forte Agent 1.92/32.572
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

>When I try to create an exe or build allegro I always end up with the
>following (one or both lines):
>c:/djgpp/bin/ld.exe: cannot find -lgcc
>collect2: ld returned 1 exit status
>
>This is what I get under both w2k and in what is called MSDOS7.
..SNIP..
>At the same time I'm able to run either of these same two DJGPP distros on
>the dad's PC under w98 and DOS7.
>
>I'm wondering what can be so badly broken here...
..SNIP..
>
>Any hidden semantics? Any features I'm not aware of?
Yes, see below.
>This is puzzling me the second day in the raw. Can't even think of any
>possible prob. Any ideas?

I have not seen this one so lets go back to basics:-
There are quite a few quirks when trying to get the compiler working
on 2K/XP with old non 2K/XP aware code. The easiest is to upgrade to
one that is 2K/XP aware.

1) The first is to check that the exes in the bin and
\lib\gcc-lib\djgpp\3.21 are dated after 01-Dec-2001. If they are not
check at Simtel for an update.
2) Grab Rhide 1.5.0 snapshot from www.rhide.com
3) Grab GCC 3.2.1 from Simtel 
4) Grab Allegro 4.1.7 (or later)
5) Grab the latest of the rest of the packages in the list.

The reason I say to grab the later versions is that these usually use
later LIBC code and as such have more 2K/XP support in them.
I would advise that you do not mix Allegro 3.x and GCC 3.x otherwise
you will need to patch Allegro, but if you use Allegro 4.1.7 and GCC
3.2.1 you will not need to do any patching. There are allot of bug
fixes and enhancements in Allegro since the one you are using and it's
now has cross platform support.

Once you do this try to make a simple hello.c by using the following
and if it fails post the outout:
gcc -o hello.exe hello.c

Please also give the version numbers that are printed when you run the
following commands (two '-' in a row):-
ld --version 
gcc --version

If you want know more about the 2K/XP changes or want to try the
latest 2.04 alpha goto http://clio.rice.edu/djgpp/win2k/main.htm

Andrew

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019