Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Re: compiler complains about multiple definition of CGAL::do_intersect

Subject: CGAL users discussion list

List archive

[cgal-discuss] Re: compiler complains about multiple definition of CGAL::do_intersect


Chronological Thread 
  • From: Ramin H <>
  • To:
  • Subject: [cgal-discuss] Re: compiler complains about multiple definition of CGAL::do_intersect
  • Date: Thu, 10 Dec 2009 12:07:13 -0500
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=fChHM7NwcS8wyNyyLeWbeFap6+qwOlAKMKMmqMeD+SSHfP6VmpiRQo7FUktgze9Zly xQR9WsxIyMDw6LcIQT75D3J7hyIuQNlGYLft27TE0lHjj29O5bDcwSmmJypamI0Z0PDh ghIdpBJ/aZm01xFzEO+4wsuKn2dioMTBBELb0=

I made a mini version of my project to reproduce this error. I am
attaching the project to this message. (test-cgal.tar.gz)

To test, extract the tar.gz file and do the following:
(You may need to edit the path to CGAL in test-cgal.pro)
$ qmake test-cgal.pro
$ make

I really appreciate it if you can help me find out why CGAL is
behaving like this and if you know a work around.

Thank you.
-Ramin

On Thu, Dec 10, 2009 at 10:39 AM, Ramin H
<>
wrote:
> Hi everyone,
> I have a project that uses CGAL-3.5. The project compiles completely
> but when linking, I get errors that I can not make sens of:
>
> ------------------------------
> rintersectionset.o: In function `CGAL::do_intersect(CGAL::Bbox_3
> const&, CGAL::Bbox_3 const&)':
> rintersectionset.cpp:(.text+0x0): multiple definition of
> `CGAL::do_intersect(CGAL::Bbox_3 const&, CGAL::Bbox_3 const&)'
> main.o:main.cpp:(.text+0x0): first defined here
>
> rmainwindow.o: In function `CGAL::do_intersect(CGAL::Bbox_3 const&,
> CGAL::Bbox_3 const&)':
> rmainwindow.cpp:(.text+0x0): multiple definition of
> `CGAL::do_intersect(CGAL::Bbox_3 const&, CGAL::Bbox_3 const&)'
> main.o:main.cpp:(.text+0x0): first defined here
>
> rmodel.o: In function `CGAL::do_intersect(CGAL::Bbox_3 const&,
> CGAL::Bbox_3 const&)':
> rmodel.cpp:(.text+0x0): multiple definition of
> `CGAL::do_intersect(CGAL::Bbox_3 const&, CGAL::Bbox_3 const&)'
> main.o:main.cpp:(.text+0x0): first defined here
>
> RMeshPolyhedralDomain.o: In function `CGAL::do_intersect(CGAL::Bbox_3
> const&, CGAL::Bbox_3 const&)':
> RMeshPolyhedralDomain.cpp:(.text+0x0): multiple definition of
> `CGAL::do_intersect(CGAL::Bbox_3 const&, CGAL::Bbox_3 const&)'
> main.o:main.cpp:(.text+0x0): first defined here
>
> moc_rmainwindow.o: In function `CGAL::do_intersect(CGAL::Bbox_3
> const&, CGAL::Bbox_3 const&)':
> moc_rmainwindow.cpp:(.text+0x0): multiple definition of
> `CGAL::do_intersect(CGAL::Bbox_3 const&, CGAL::Bbox_3 const&)'
> main.o:main.cpp:(.text+0x0): first defined here
>
> collect2: ld returned 1 exit status
> make: *** [mesh01] Error 1
> -----------------------------
>
> and the main.cpp is:
> -------------
> #include "rmainwindow.h"
> #include <QApplication>
> #include <QtOpenGL>
> #include <QtDebug>
>
> int main( int argc, char *argv[] )
> {
>    QApplication app(argc,argv);
>    RMainWindow mainWin;
>    mainWin.show();
>    return app.exec();
> }
> -----------
>
> Why is the compiler complaining about CGAL::do_intersect being already
> defined in main.cpp?
>
> Thank you,
> -Ramin
>

Attachment: test-cgal.tar.gz
Description: GNU Zip compressed data




Archive powered by MHonArc 2.6.16.

Top of Page