delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/23/12:04:21

From: Andrew Crabtree <andrewc AT typhoon DOT rose DOT hp DOT com>
Message-Id: <199707231604.AA125943852@typhoon.rose.hp.com>
Subject: Re: error: undefined reference
To: ivanmdeb AT maltanet DOT net
Date: Wed, 23 Jul 1997 9:04:12 PDT
Cc: djgpp AT delorie DOT com
In-Reply-To: <33D6328E.1EE3@maltanet.net>; from "Ivan-Mark Debono" at Jul 23, 97 9:34 am

> 
> I have renamed the TILE, SPRITE and MAP to .C files instead of .H files.
> The compiler already has the -c directive, but now 2 other errors occur:
> 
> Error: gcc.exe: bwmaped.o: linker input file unused since linking not
> done
> Error: gcc.exe: -lalleg: linker input file unused since linking not done
> 
> Can anybody help???

I don't think these are errors (they may cause make to die, but things
are still being built correctly.

Sounds like you are specifying a compile line like this

gcc -c bwmaped.c -lalleg

You should not be including any '-l' library options until you 
are linking the final executable.  

Something like this should work (add other options like -I or -W or -O as 
needed)

gcc -c file1.c
gcc -c file2.c
gcc -c file3.c 
...

gcc -o myexe.exe file1.o file2.o file3.o ... -lalleg 

Andrew

- Raw text -


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