Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Surface reconstruction compiler error

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Surface reconstruction compiler error


Chronological Thread 
  • From: "Laurent Rineau (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Surface reconstruction compiler error
  • Date: Thu, 15 Oct 2009 10:48:11 +0200
  • Organization: GeometryFactory

On Thursday 15 October 2009 01:14:39 David Doria wrote:
> On Wed, Oct 14, 2009 at 6:18 PM, Laurent Rineau (GeometryFactory) <
>
> >
> wrote:
> > Le mercredi 14 octobre 2009 23:38:54, David Doria a écrit :
> > > I tried to compile the Surface_reconstruction_points_3 example, and on
> >
> > this
> >
> > > line:
> > > unsigned char ind[3] = {(in+1)&3,(in+2)&3,(in+3)&3};
> >
> > I thought that syntax was only usable when the values in { } were
> > constant expressions. I do not understand why you get the following error
> > message, but
> > it may be related.
> >
> > > I received the error:
> > > error: narrowing conversion of '(((int)in1) & 3)' from 'int' to
> > > 'unsigned char' inside { }
> > >
> > >
> > >
> > > Also, I am linking to libCGAL and libtaucs but still getting lots of
> > > linking errors
> > >
> > > SurfaceReconstruction.cpp:(.text.__gmpq_neg[__gmpq_neg]+0x1c):
> > > undefined reference to `__gmpq_set'
> > >
> > > Which other libraries do I need to link to?
> >
> > gmp
> >
> > --
> > Laurent Rineau, PhD
>
> 1) You are correct that only constants are allowed in { } - that's why I'm
> confused that non-constants appear in the { } in the code I downloaded
> (cgal)!

Actually I was wrong. I have re-read the C++ norm, in the section
*8.5 Initializers [dcl.init]*, and even in the the initializers for
aggregates
and arrays, the expressions in the { } do not need to be constant.

What compiler do you use? It is probably buggy, and not supported by the CGAL
project.

> 2) I had to link to: CGAL, taucs, lapack, and metis. Could there be a line
> added to each example (or even better, each class) that says
> //Required libraries: CGAL, taucs, lapack, and metis
>
> where those libraries are clearly replaced with the libraries needed for
> the particular case.

CGAL examples and demos are shipped with CMake scripts, that precisely states
which libraries to link with, for each example or demo. If you do not use
CMake, at least you should have a look at those files. Sometimes, the list of
libraries to link with depends on the platform. We cannot duplicate the logic
of the CMakeLists.txt files in another place.

> 3) On the "preliminaries" page:
> http://www.cgal.org/Manual/3.4/doc_html/cgal_manual/Preliminaries/Chapter_m
> ain.html it says: "*CAUTION:* Since version 3.3.1, CGAL is no longer
> compatible with the official release of TAUCS (currently 2.2). Make sure
> to use the modified version provided in the download section. "
>
> However, on the download page: http://www.cgal.org/cgi-bin/cgal_download.pl
> It says "You can download the official release from
> http://www.tau.ac.il/~stoledo/taucs
> <http://www.tau.ac.il/%7Estoledo/taucs>or download a slightly customized
> variant, which is simpler to install. " with no such warning. I think the
> warning should definitely be stated there too. In fact, is there a reason
> that taucs is not included in the release and needs to be installed
> separately? This type of thing could be an option to install in the cmake
> configuration file.

TAUCS is a big library, and most of CGAL packages do not use it. What is
more,
TAUCS is an external library, with different copyright and license than CGAL.
The CGAL project has the right to redistribute TAUCS, but if it was in the
same tarball as CGAL, the license scheme of the tarball would be more
complicated than now.

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/



Archive powered by MHonArc 2.6.16.

Top of Page