delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/20/15:21:17

Message-ID: <33F875ED.967DAE7F@fcee.urv.es>
Date: Mon, 18 Aug 1997 18:18:53 +0200
From: Alexis Roda <arv AT astor DOT urv DOT es>
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Weird debugging problems
References: <33f0f2e2 DOT 1965997 AT nntp DOT mbnet DOT mb DOT ca>
NNTP-Posting-Host: 195.5.72.238
Lines: 36
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Jeremy Penner wrote:
> 
> I'm having trouble with the -g option.  I use:
> gcc leveled.c -g leveled.exe tilelib.o sprite.o -lalleg
> and it spews out page after page of "multiple definitions" for every
> function I use.  Here's a sample:

Try

gcc -o leveled.exe -g leveled.c titlelib.o sprite.o -lalleg

it seems gcc is taking laveled.exe as an object file to link with rather
tan the output file, and it complains about multiple definition of
everything. I've just testet it with a simple hello_world-like program:

bash$ gcc linea.c -g linea.exe
linea.exe(.text+0x1d8):crt0.s: multiple definition of `__exit'
e:/gcc/lib\crt0.o(.text+0x1d8):crt0.s: first defined here
linea.exe(.text+0x2c0):crt0.s: multiple definition of `__sbrk'
e:/gcc/lib\crt0.o(.text+0x2c0):crt0.s: first defined here
linea.exe(.text+0x4a4):crt0.s: multiple definition of
`_crt0_init_mcount'
e:/gcc/lib\crt0.o(.text+0x4a4):crt0.s: first defined here
linea.exe(.text+0x2d8):crt0.s: multiple definition of `__brk'
e:/gcc/lib\crt0.o(.text+0x2d8):crt0.s: first defined here
linea.exe(.text+0x0):crt0.s: multiple definition of `start'
e:/gcc/lib\crt0.o(.text+0x0):crt0.s: first defined here
linea.exe(.text+0x4c4):crt0.s: multiple definition of `main'
e:/gcc/tmp\ccdaaaaa:linea.c:4: first defined here

while gcc -o linea.exe -g linea.c works fine.

Hope this helps.

Saludos
Alexis Roda

- Raw text -


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