delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/29/11:00:36

From: brunobg AT geocities DOT com (Bruno Barberi Gnecco)
Newsgroups: comp.os.msdos.djgpp
Subject: Compiling multiple files
Date: 29 Jul 1998 09:52:01 -0500
Organization: Newscene Public Access Usenet News Service (http://www.newscene.com/)
Lines: 29
Message-ID: <35bf288f.1606540@news3.newscene.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I wrote a program made of several files, and when I tried to compile (using
RHIDE), it returned:
Error: config.o: In function `loadconfig':
config.c(8) Error: multiple definition of `loadconfig'
o:config.c(8) Error: first defined here
Error: config.o: In function `newconfig':
config.c(24) Error: multiple definition of `newconfig'
o:config.c(24) Error: first defined here
Error: config.o(.data+0x0):config.c: multiple definition of `defaultprefs'
Error: config.o(.data+0x0):config.c: first defined here
etc...
For all functions! The I tried to compile using gcc - o file.exe *.o, and the
result was:

main.o(.data+0x0):main.c: multiple definition of `defaultprefs'
config.o(.data+0x0):config.c: first defined here
menu.o: In function `about':
menu.c:386: multiple definition of `about'
main.o(.data+0x70):main.c: first defined here
d:/djgpp/bin/ld.exe: Warning: type of symbol `_about' changed from 114 to 33 in
menu.o
menu.o(.data+0x0):menu.c: multiple definition of `defaultprefs'
config.o(.data+0x0):config.c: first defined here

What's the problem?

"There's never enough time to do all the nothing you want" Bill Watterson 
Bruno Barberi Gnecco <brunobg AT geocities DOT com> ICQ #1383173 - PGP 5.0i user 
My other OS is Linux -=- http://graphx.home.ml.org -=- Electric Eng, Poli

- Raw text -


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