Skip to Content.
Sympa Menu

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

Subject: CGAL users discussion list

List archive

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


Chronological Thread 
  • From: Pierre Alliez <>
  • To:
  • Subject: Re: [cgal-discuss] Re: compiler complains about multiple definition of CGAL::do_intersect
  • Date: Thu, 10 Dec 2009 09:24:28 -0800
  • Organization: INRIA

hi Ramin,

I see the problem.

in your file cgal3-5/include/cgal/aabb_intersections.h
comment the line
#include <CGAL/AABB_intersections/Bbox_3_bbox_3_do_intersect.h>

we'll fix this.

thank you,
Pierre Alliez
INRIA Sophia Antipolis - Mediterranee 
Project-team GEOMETRICA 
http://www-sop.inria.fr/members/Pierre.Alliez/
Tel: +33 4 92 38 76 77
Fax: +33 4 97 15 53 95


Ramin H a écrit :
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

    

  



Archive powered by MHonArc 2.6.16.

Top of Page