Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Re: Compiling a basic CGAL program in C++ on Mac OS X 10.7.2

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Re: Compiling a basic CGAL program in C++ on Mac OS X 10.7.2


Chronological Thread 
  • From: Philipp Moeller <>
  • To:
  • Subject: Re: [cgal-discuss] Re: Compiling a basic CGAL program in C++ on Mac OS X 10.7.2
  • Date: Tue, 14 Feb 2012 16:11:01 +0100
  • Organization: GeometryFactory

Bagga
<>
writes:

> Thank you Sebastian but I am still having troubles with CGAL Compilation.
> /Sorry I am replying to this a bit late/:
>
> I have made the changes you asked me to do:
> --------------------------------------
> /The double /opt/local/ is the cause of your problem.
> Check the value of CGAL_MODULES_DIR in the file
> $CGAL_DIR/CGALConfig.cmake (which is use to set
> CGAL_USE_FILE)
>
> You need to change that file as root.
> You can also download the source and compile it yourself.
> /
> -----------------------------------------
>
> Now when I compile using CMake GUI(2.8.6) it *Configures* and *Generates*
> without giving any error or comments (e.g. /This program requires CGAL so
> cannot be compiled/) as before.
>
> Here is the output I got after doing cmake fro Cmake GUI:
>
> The C compiler identification is GNU
> The CXX compiler identification is GNU
> Checking whether C compiler has -isysroot
> Checking whether C compiler has -isysroot - yes
> Checking whether C compiler supports OSX deployment target flag
> Checking whether C compiler supports OSX deployment target flag - yes
> Checking whether CXX compiler has -isysroot
> Checking whether CXX compiler has -isysroot - yes
> Checking whether CXX compiler supports OSX deployment target flag
> Checking whether CXX compiler supports OSX deployment target flag - yes
> Build type: Release
> USING CXXFLAGS = '-pipe -O2 -arch x86_64 -O3 -DNDEBUG'
> USING EXEFLAGS = ' -L/opt/local/lib -arch x86_64
> -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
> '
> Targetting Unix Makefiles
> Using /usr/bin/c++ compiler.
> DARWIN_VERSION=11
> Mac Leopard detected
> Configuring done
>
> *Now here is my Query:*
> After that now when I do *make* to compile the code it gives me a lot of
> errors as shown below:
>
>
> Scanning dependencies of target vd_2_point_location
> [100%] Building CXX object
> CMakeFiles/vd_2_point_location.dir/vd_2_point_location.cpp.o
> In file included from
> /Users/singhg/Programming/CGAL-3.9/examples/Voronoi_diagram_2/../../include/CGAL/Bbox_2.h:30,
> from
> /Users/singhg/Programming/CGAL-3.9/examples/Voronoi_diagram_2/../../include/CGAL/basic_classes.h:30,
> from
> /Users/singhg/Programming/CGAL-3.9/examples/Voronoi_diagram_2/../../include/CGAL/Cartesian/Cartesian_base.h:28,
> from
> /Users/singhg/Programming/CGAL-3.9/examples/Voronoi_diagram_2/../../include/CGAL/Simple_cartesian.h:27,
> from
> /Users/singhg/Programming/CGAL-3.9/examples/Voronoi_diagram_2/../../include/CGAL/Exact_predicates_inexact_constructions_kernel.h:27,
> from
> /Users/singhg/Programming/CGAL-3.9/examples/Voronoi_diagram_2/vd_2_point_location.cpp:7:
> /Users/singhg/Programming/CGAL-3.9/examples/Voronoi_diagram_2/../../include/CGAL/array.h:81:
> error: expected nested-name-specifier before ‘...’ token
> /Users/singhg/Programming/CGAL-3.9/examples/Voronoi_diagram_2/../../include/CGAL/array.h:81:
> error: expected ‘>’ before ‘...’ token
> /Users/singhg/Programming/CGAL-3.9/examples/Voronoi_diagram_2/../../include/CGAL/array.h:83:
> error: template argument 2 is invalid
> /Users/singhg/Programming/CGAL-3.9/examples/Voronoi_diagram_2/../../include/CGAL/array.h:84:
> error: expected ‘,’ or ‘...’ before ‘&’ token
> /Users/singhg/Programming/CGAL-3.9/examples/Voronoi_diagram_2/../../include/CGAL/array.h:84:
> error: ISO C++ forbids declaration of ‘Args’ with no type
> /Users/singhg/Programming/CGAL-3.9/examples/Voronoi_diagram_2/../../include/CGAL/array.h:
> In function ‘int CGAL::make_array(const T&, int)’:
> /Users/singhg/Programming/CGAL-3.9/examples/Voronoi_diagram_2/../../include/CGAL/array.h:86:
> error: template argument 2 is invalid
> /Users/singhg/Programming/CGAL-3.9/examples/Voronoi_diagram_2/../../include/CGAL/array.h:86:
> error: invalid type in declaration before ‘=’ token
> /Users/singhg/Programming/CGAL-3.9/examples/Voronoi_diagram_2/../../include/CGAL/array.h:86:
> error: ‘args’ was not declared in this scope
> /Users/singhg/Programming/CGAL-3.9/examples/Voronoi_diagram_2/../../include/CGAL/array.h:86:
> error: expected `}' before ‘...’ token
> /Users/singhg/Programming/CGAL-3.9/examples/Voronoi_diagram_2/../../include/CGAL/array.h:86:
> error: expected `}' before ‘...’ token
> /Users/singhg/Programming/CGAL-3.9/examples/Voronoi_diagram_2/../../include/CGAL/array.h:86:
> error: expected ‘,’ or ‘;’ before ‘...’ token
> /Users/singhg/Programming/CGAL-3.9/examples/Voronoi_diagram_2/../../include/CGAL/array.h:
> At global scope:
> /Users/singhg/Programming/CGAL-3.9/examples/Voronoi_diagram_2/../../include/CGAL/array.h:87:
> error: expected unqualified-id before ‘return’
> /Users/singhg/Programming/CGAL-3.9/examples/Voronoi_diagram_2/../../include/CGAL/array.h:88:
> error: expected declaration before ‘}’ token
> make[2]: *** [CMakeFiles/vd_2_point_location.dir/vd_2_point_location.cpp.o]
> Error 1
> make[1]: *** [CMakeFiles/vd_2_point_location.dir/all] Error 2
> make: *** [all] Error 2
>
>
> *Please tell me if you know what is going wrong. *
> I really appreciate your help.
> Thank you

This looks like the template barf created by gcc when compiling a file
with variadic template code without the -std=c++0x flag. This is usually
controlled by #ifdef's and defines that are set when CGAL is built. How
did you configure CGAL when you installed it?

Cheers,
Philipp



Archive powered by MHonArc 2.6.16.

Top of Page