iut-ibk / DynaMind-ToolBox

DynaMind-ToolBox
www.dance4water.org
GNU General Public License v2.0
9 stars 6 forks source link

Compiling with <cgalgeometry_p> & MSVC #237

Closed zacharias2k closed 10 years ago

zacharias2k commented 10 years ago

This error keeps annoying me for a few weeks now, still haven't found any solution.

Compilerlog boost/utility/detail/result_of_iterate.hpp(125): error C2893: Funktionsvorlage 'add_rvalue_reference::type boost::declval(void)' konnte nicht spezialisiert werden

Source DynAlp (\DynaMind-ToolBox\DynaMind-DynAlp\src\urbandevelDivision.h) and PowerVIBe (e.g. \DynaMind-ToolBox\PowerVIBe\src\advancedparceling.cpp) both cause this error uppon using Arrangement_2. See cgalgeometry_p.h (\DynaMind-ToolBox\DynaMind-Extensions\src\cgalgeometry_p.h) for further definition of the used traits.

Conditions

Possible reasons

Traceback

2> Hinweis: Einlesen der Datei: D:\dev\DynaMind-ToolBox\DynaMind-Extensions\src\cgalgeometry_p.h
2> Hinweis: Einlesen der Datei: C:\CGAL-4.3\include\CGAL/Lazy_exact_nt.h
2> Hinweis: Einlesen der Datei: C:\CGAL-4.3\include\CGAL/number_type_basic.h
2> Hinweis: Einlesen der Datei: C:\CGAL-4.3\include\CGAL/basic.h
2> Hinweis: Einlesen der Datei: C:\CGAL-4.3\include\CGAL/result_of.h
2> Hinweis: Einlesen der Datei: C:\boost\boost_1_52_0\boost/utility/result_of.hpp
2> Hinweis: Einlesen der Datei: C:\boost\boost_1_52_0\boost/preprocessor/iteration/detail/iter/forward1.hpp
2> Hinweis: Einlesen der Datei: C:\boost\boost_1_52_0\boost/utility/detail/result_of_iterate.hpp

2>c:\boost\boost_1_52_0\boost\utility\detail\result_of_iterate.hpp(125): error C2893: Funktionsvorlage 'add_rvalue_reference::type boost::declval(void)' konnte nicht spezialisiert werden
2> Mit den folgenden Vorlagenargumenten:
2> 'F'
christianurich commented 10 years ago

had troubles with cgal and C++11 and had to change for a while to the c++98 standard to make it work. Can't really remember what the error message was, but this one looks familiar.

zacharias2k commented 10 years ago

You are right, it seems to be a C++11 issue, compiling with C89 removes the error, but unfortunately I need at least C99 - which is not possible in MSVC :-(

Update: The error origins from GDAL. Including it along with cgal leads to the error.

Solution: Remove GDAL include (for now).