delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/07/06/12:16:15

From: GianPiero Puccioni <gip AT firefox DOT ino DOT it>
Subject: compilation problem (GRX + debug)
To: djgpp AT sun DOT soe DOT clarkson DOT edu (DJGPP List)
Date: Wed, 6 Jul 94 17:56:11 LEG
Mailer: Elm [revision: 66.25]

I have a small problem. If I  try  to compile a file with the GRX library
and the debugger i.e. with the command

  gcc -g testm.c -o testm -lgrx -lm

I get this error:   p:/djgpp/bin/ld.exe: Can't open gcc

But if I do this in two steps it works i.e.

  gcc  -g -c testm.c
  gcc  testm.o -o testm -lgrx -lm

but if the second line is
  gcc -g   testm.o -o testm -lgrx -lm

I get that error again.

using "-v" to see what happens it seems that the only difference (beside
the use of a temp file instead of testm.o) is that ld.exe is called as

       p:/djgpp/bin/ld.exe -o testm p:/djgpp/lib/crt0.o -Lp:/djgpp/lib
              c:/temp/ccb00104 -lgrx -lm -lgcc -lg -lc -lgcc

instead of

        p:/djgpp/bin/ld.exe -o testm p:/djgpp/lib/crt0.o -Lp:/djgpp/lib
                       testm.o -lgrx -lm -lgcc -lc -lgcc

there is an extra -lg (and by the way, why -lgcc is there twice?).

Any suggestion ?

Ciao,
                      GianPiero

--
****************************************************************************
*  Istituto Nazionale di Ottica                        GianPiero Puccioni  *
*  Largo E.Fermi 6                           E-Mail :  gip AT firefox DOT ino DOT it  *
*  I-50125  Firenze - ITALY             c=it;a=garr;p=ino;o=firefox;s=gip  *
*  Tel +39 55 23081  -  Fax +39 55 2337755                                 *
****************************************************************************

- Raw text -


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