delorie.com/archives/browse.cgi | search |
From: | arg AT whangomatic DOT freeserve DOT co DOT uk (Andrew R. Gillett) |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | -Wall - position on command line |
Date: | Wed, 2 Jun 1999 18:47:05 +0100 |
Organization: | www.release-dates.co.uk |
Lines: | 36 |
Message-ID: | <MPG.11bf783f9ba8f62598acfe@news.freeserve.net> |
NNTP-Posting-Host: | modem-110.name57.dialup.pol.co.uk |
X-Trace: | news7.svr.pol.co.uk 928345609 5155 62.136.188.110 (2 Jun 1999 17:46:49 GMT) |
NNTP-Posting-Date: | 2 Jun 1999 17:46:49 GMT |
X-Complaints-To: | abuse AT theplanet DOT net |
X-Newsreader: | MicroPlanet Gravity v2.11 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
When linking my program, if I use the command line: gpp main.o battle.o unit.o music.o -o f_alli.exe -ljgmod -lalleg -Wall it would give no warnings. However, if I use: gpp main.o battle.o unit.o music.o -o -Wall f_alli.exe -ljgmod -lalleg I get loads of multiple definition errors, e.g. f_alli.exe(.data+0xac):crt0.s: multiple definition of `active_page' main.o(.data+0x8):main.cpp: first defined here f_alli.exe(.text+0x4a8):crt0.s: multiple definition of `timer_interrupt(...)' main.o(.text+0x0):main.cpp: first defined here f_alli.exe(.text+0x1d8):crt0.s: multiple definition of `__exit' c:/tools/djgpp/lib/crt0.o(.text+0x1d8):crt0.s: first defined here f_alli.exe(.data+0xb0):crt0.s: multiple definition of `visual_page' main.o(.data+0xc):main.cpp: first defined here f_alli.exe(.text+0x4740):battle.cpp: multiple definition of `world_class::scroll_terrain(void)' battle.o(.text+0x21ec):battle.cpp: first defined here Why does it matter where the -Wall switch goes on the command line, and where did all these multiple definition errors come from? -- Andrew Gillett http://argnet.fatal-design.com/ ICQ: See homepage You will meet a tall dark stranger. Unfortunately he's holding a large gun. Run for it!
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |