multiple definition of `main'
Devrim Erdem
devrim@vires.com
Mon Jan 21 08:51:00 GMT 2002
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
-------------------------------------
More information about the Gcc-help
mailing list