Subject: CGAL users discussion list
List archive
- From: "Krebs Ambroise" <>
- To: <>
- Subject: RE: [cgal-discuss] Re: Multiple definition problem
- Date: Thu, 11 Jan 2007 16:59:03 +0100
Great, thank you,
Best regards,
Ambroise
-----Original Message-----
From: Johannes Otepka
[mailto:]
Sent: Wed 1/10/2007 6:41 PM
To:
Subject: Re: [cgal-discuss] Re: Multiple definition problem
Hi Ambroise,
I have seen these multiple definition errors on my windows maschine too.
The problem is that the functions
VRML_2_ostream& operator<<(VRML_2_ostream& os, const char* s)
VRML_2_ostream& operator<<(VRML_2_ostream& os, const double& d)
are declared (rather than defined) in VRML_2_ostream.h. So all cpp-file
including "VRML_2_ostream.h" will show up this multiple definition problem.
solution: make these two functions inline (inline VRML_2_ostream&
operator<<(VRML_2_ostream& os, const char* s)....) and the problem is
resolved.
I forgot to post the bug to the mailing list - which is done now ;-)
Cheers
Johannes
Sylvain Pion wrote:
> Hi Ambroise,
>
> Ambroise Krebs wrote:
>
>> Hi,
>> Well, I write here as I have a problem.
>> I was using CGAL-3.1 with Linux Ubuntu Hoary and everything was fine.
>> I upgraded to Linux Ubuntu Dapper and the compiler was not recognized
>> for CGAL-3.1, so I changed it for CGAL-3.2.1.
>> I could install it without any problem, but when I compile a project
>> that uses it (and that worked perfectly with CGAL-3.1), I get the
>> following error:
>>
>> .//libgeom.a(GenericObject.o): In function
>> `CGAL::operator<<(CGAL::VRML_2_ostream&, char
>> const*)':GenericObject.cc:(.text+0x0): multiple definition of
>> `CGAL::operator<<(CGAL::VRML_2_ostream&, char const*)'
>> geometry_test.o:geometry_test.cc:(.text+0x0): first defined here
>> .//libgeom.a(GenericObject.o): In function
>> `CGAL::operator<<(CGAL::VRML_2_ostream&, double
>> const&)':GenericObject.cc:(.text+0x28): multiple definition of
>> `CGAL::operator<<(CGAL::VRML_2_ostream&, double const&)'
>> geometry_test.o:geometry_test.cc:(.text+0x28): first defined here
>>
>> I really don't know what is wrong, did anybody else met this kind of
>> problem before?
>> Any help would be appriciated.
>
>
> What is libgeom.a and what is GenericObject.o ?
> These do not come from CGAL, I think.
>
>
> Also, note that sometimes install_cgal says a compiler is not supported,
> while it actually works.
>
> Best,
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
- Multiple definition problem, Ambroise Krebs, 01/09/2007
- Re: Multiple definition problem, Sylvain Pion, 01/10/2007
- RE: [cgal-discuss] Re: Multiple definition problem, Krebs Ambroise, 01/10/2007
- Re: [cgal-discuss] Re: Multiple definition problem, Johannes Otepka, 01/10/2007
- Re: [cgal-discuss] Re: Multiple definition problem, Sylvain Pion, 01/10/2007
- RE: [cgal-discuss] Re: Multiple definition problem, Krebs Ambroise, 01/11/2007
- Re: Multiple definition problem, Sylvain Pion, 01/10/2007
Archive powered by MHonArc 2.6.16.