cmake error

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

cmake error

myociss
Hello,

I am working on a python wrapper for the labeled image meshing capability. My code is practically identical to this example https://doc.cgal.org/latest/Mesh_3/Mesh_3_2mesh_3D_image_8cpp-example.html, although the method is not defined as a main method. The file is named mesh_utils.cpp. 

 
Here is the code within CMakeLists.txt:

# Created by the script cgal_create_CMakeLists
# This is the CMake script for compiling a set of CGAL applications.

project( geometry_core )


cmake_minimum_required(VERSION 2.8.11)

# CGAL and its components
find_package( CGAL QUIET COMPONENTS  )

if ( NOT CGAL_FOUND )

  message(STATUS "This project requires the CGAL library, and will not be compiled.")
  return()  

endif()

# include helper file
include( ${CGAL_USE_FILE} )


# Boost and its components
find_package( Boost REQUIRED )

if ( NOT Boost_FOUND )

  message(STATUS "This project requires the Boost library, and will not be compiled.")

  return()  

endif()

add_library(mesh_utils mesh_utils.cpp)
link_libraries(mesh_utils CGAL::CGAL)


Running make produces this error:

wrong number of template arguments (1, should be at least 2)

typedef CGAL::Labeled_mesh_domain_3<K> Mesh_domain;


Thank you so much for any advice you can offer me; I am a new C++ programmer so it is hopefully something simple that I have overlooked (although I have been working on fixing this error for some time now).
Reply | Threaded
Open this post in threaded view
|

Re: cmake error

andreas.fabri

Can you put a self-contained .ccp   on https://gist.github.com/

Best,

Andreas

On 3/18/2019 5:13 AM, Megan Yociss wrote:
Hello,

I am working on a python wrapper for the labeled image meshing capability. My code is practically identical to this example https://doc.cgal.org/latest/Mesh_3/Mesh_3_2mesh_3D_image_8cpp-example.html, although the method is not defined as a main method. The file is named mesh_utils.cpp. 

 
Here is the code within CMakeLists.txt:

# Created by the script cgal_create_CMakeLists
# This is the CMake script for compiling a set of CGAL applications.

project( geometry_core )


cmake_minimum_required(VERSION 2.8.11)

# CGAL and its components
find_package( CGAL QUIET COMPONENTS  )

if ( NOT CGAL_FOUND )

  message(STATUS "This project requires the CGAL library, and will not be compiled.")
  return()  

endif()

# include helper file
include( ${CGAL_USE_FILE} )


# Boost and its components
find_package( Boost REQUIRED )

if ( NOT Boost_FOUND )

  message(STATUS "This project requires the Boost library, and will not be compiled.")

  return()  

endif()

add_library(mesh_utils mesh_utils.cpp)
link_libraries(mesh_utils CGAL::CGAL)


Running make produces this error:

wrong number of template arguments (1, should be at least 2)

typedef CGAL::Labeled_mesh_domain_3<K> Mesh_domain;


Thank you so much for any advice you can offer me; I am a new C++ programmer so it is hopefully something simple that I have overlooked (although I have been working on fixing this error for some time now).
-- 
Andreas Fabri, PhD
Chief Officer, GeometryFactory
Editor, The CGAL Project

phone: +33.492.954.912    skype: andreas.fabri
Reply | Threaded
Open this post in threaded view
|

Re: cmake error

Laurent Rineau (CGAL/GeometryFactory)
In reply to this post by myociss
On Monday, March 18, 2019 5:13:35 AM CET Megan Yociss wrote:

> Running make produces this error:
>
> wrong number of template arguments (1, should be at least 2)
>
> typedef CGAL::Labeled_mesh_domain_3<K> Mesh_domain;
>
>
> Thank you so much for any advice you can offer me; I am a new C++
> programmer so it is hopefully something simple that I have overlooked
> (although I have been working on fixing this error for some time now).

Hi,

Generally, you need to add precision to bug reports.

The title of your email says "cmake error" but you report a compilation error,
emitted by your compiler.

You forgot to specify which version of CGAL you were using. And which compiler
and which compiler version.


My guess is that you are using a version of CGAL that is CGAL-4.12 or earlier.
The API and documentation of `CGAL::Labeled_mesh_domain_3` has changed in
CGAL-4.13. You should use the examples and documentation of the version of
CGAL you are using. There is a menu button to change the CGAL version, in the
documentation page. As for the example you have pointed, the version of
CGAL-4.12.1 is that one:

  https://doc.cgal.org/4.12.1/Mesh_3/Mesh_3_2mesh_3D_image_8cpp-example.html

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




--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: cmake error

myociss
Ah, I see that I have the demos for 4.12 installed but CGAL 4.11 installed.
Thank you so much for your help.



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss