public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* multiple definition of `main'
@ 2002-01-21  8:51 Devrim Erdem
  2002-01-21 17:56 ` ???
  0 siblings, 1 reply; 2+ messages in thread
From: Devrim Erdem @ 2002-01-21  8:51 UTC (permalink / raw)
  To: gcc-help

Hello,

I am having a problem of multiple definitions which I couldn't figure out.

The full linker is here :

Obj_Linux_IA32/Graphics.a(DynModel.o): In function `Gfx::TestModel 
type_info function':
/vires/devrim/Projects/Fstd/Src/Modules/Graphics/DynModel.hh(.text+0x0): 
multiple definition of `main'
.Obj_Linux_IA32/Graphics.a(Graphics.o)(.text+0x0):/vires/devrim/Projects/Fstd/Src/Modules/Graphics/Graphics.cc: 
first defined here
collect2: ld returned 1 exit status

This happens when I use the class TestModel ( which is in DynModel.hh ). It is true that Graphics.cc has a main but it is definetely not multiply defined.

I had experienced similar problems when I implement a class method in header file out of the class scope without using the "inline" word. Adding inline would fix those. This one makes me clueless. 

Any ideas...?

gcc-2.95.3-124 on SuSE 7.3

Regards.

-- 
Devrim Erdem
-------------------------------------
VIRES Simulationstechnologie GmbH
Oberaustrasse 34
83026 Rosenheim
Germany
phone    +49.8031.463640
fax      +49.8031.463645
email    devrim@vires.com
internet www.vires.com
-------------------------------------


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-01-22  1:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-21  8:51 multiple definition of `main' Devrim Erdem
2002-01-21 17:56 ` ???

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).