Home › Forum › SOFA › Using SOFA › [SOLVED] comiling errors about CGALplugin
Tagged: 64_bits, CGALplugin, SOFA_1612, vs2015
- This topic has 5 replies, 2 voices, and was last updated 7 years, 8 months ago by Lujain.
-
AuthorPosts
-
24 March 2017 at 08:26 #8820LujainBlocked
Hello guys,
I was trying to compile with CGAL plugin in sofa_v16.12, VS2015, boost_1.62,CGAL4.9.
All seem fine but in the end, when i compiled in VS, it informede me there are errors.
"C2440 “<function-style-cast>”: can't convert from “initializer list” into “result_type” (compile sourcefile F:\sofanew\sofasrc\applications\plugins\CGALPlugin\MeshGenerationFromPolyhedron.cpp) CGALPlugin C:\boost_1_62_0\boost\parameter\aux_\overloads.hpp 78"
Do you know how to solve this kind of problem?
Thanks in advance.
24 March 2017 at 15:35 #8823HugoKeymasterHey Lujain,
I needed also to update my CGAL version.
I am using CGAL plugin in SOFA master branch on linux, boost_1.58, and CGAL4.9 (as you did). I am getting significant errors as well :In file included from /data/Softwares/sofa/src/master/applications/plugins/CGALPlugin/MeshGenerationFromPolyhedron.inl:39: In file included from /usr/local/include/CGAL/Mesh_criteria_3.h:31: /usr/local/include/CGAL/Mesh_3/global_parameters.h:33:6: error: "BOOST_PARAMETER_MAX_ARITY must be at least 12 for CGAL::Mesh_3" # error "BOOST_PARAMETER_MAX_ARITY must be at least 12 for CGAL::Mesh_3" ^ In file included from /data/Softwares/sofa/src/master/applications/plugins/CGALPlugin/MeshGenerationFromPolyhedron.cpp:33: In file included from /data/Softwares/sofa/src/master/applications/plugins/CGALPlugin/MeshGenerationFromPolyhedron.inl:39: /usr/local/include/CGAL/Mesh_criteria_3.h:174:3: error: too many template arguments for class template 'parameters' BOOST_PARAMETER_CONSTRUCTOR(Mesh_criteria_3, (Base), parameters::tag, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/boost/parameter/preprocessor.hpp:1136:5: note: expanded from macro 'BOOST_PARAMETER_CONSTRUCTOR' BOOST_PARAMETER_CONSTRUCTOR_AUX( \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/boost/parameter/preprocessor.hpp:1126:5: note: expanded from macro 'BOOST_PARAMETER_CONSTRUCTOR_AUX' BOOST_PARAMETER_FUNCTION_PARAMETERS(tag_namespace, ctor, args) \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/boost/parameter/preprocessor.hpp:562:27: note: expanded from macro 'BOOST_PARAMETER_FUNCTION_PARAMETERS' ) : boost::parameter::parameters< \ ^ /usr/include/boost/parameter/parameters.hpp:714:8: note: template is declared here struct parameters ^ In file included from /data/Softwares/sofa/src/master/applications/plugins/CGALPlugin/MeshGenerationFromPolyhedron.cpp:33: In file included from /data/Softwares/sofa/src/master/applications/plugins/CGALPlugin/MeshGenerationFromPolyhedron.inl:39: /usr/local/include/CGAL/Mesh_criteria_3.h:174:3: error: too many template arguments for class template 'match' BOOST_PARAMETER_CONSTRUCTOR(Mesh_criteria_3, (Base), parameters::tag, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/boost/parameter/preprocessor.hpp:1136:5: note: expanded from macro 'BOOST_PARAMETER_CONSTRUCTOR' BOOST_PARAMETER_CONSTRUCTOR_AUX( \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/boost/parameter/preprocessor.hpp:1129:5: note: expanded from macro 'BOOST_PARAMETER_CONSTRUCTOR_AUX' BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTORS( \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/boost/parameter/preprocessor.hpp:1120:5: note: expanded from macro 'BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTORS' BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTORS0( \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note: (skipping 30 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) /usr/include/boost/preprocessor/control/iif.hpp:25:60: note: expanded from macro 'BOOST_PP_IIF_I' # define BOOST_PP_IIF_I(bit, t, f) BOOST_PP_IIF_ ## bit(t, f) ^ /usr/include/boost/preprocessor/control/iif.hpp:32:31: note: expanded from macro 'BOOST_PP_IIF_1' # define BOOST_PP_IIF_1(t, f) t ^ /usr/include/boost/parameter/preprocessor.hpp:364:39: note: expanded from macro 'BOOST_PARAMETER_FUNCTION_FWD_MATCH_Z' , typename boost::parameter::aux::match< \ ^ /usr/include/boost/parameter/preprocessor.hpp:98:8: note: template is declared here struct match ^
We’ll see what we can do with some of the plugin developpers..
Keep you updated.Cheers,
Hugo
25 March 2017 at 06:02 #8827LujainBlockedHi Hugo,
Thank you promptly! What a bad luck for the problem we have met. C++ template programming…
I also met this error at first:
error: "BOOST_PARAMETER_MAX_ARITY must be at least 12 for CGAL::Mesh_3"
I made some modification about the file global_parameters.h in ..\CGAL-4.9\include\CGAL\Mesh_3 by reference the link http://cgal-discuss.949826.n4.nabble.com/Getting-error-quot-BOOST-PARAMETER-MAX-ARITY-must-be-at-least-12-for-CGAL-Mesh-3-quot-in-CGAL-4-9-td4662304.html#a4662307
And this error was solved but another come. Looking forward ur good news!
Besr Regards!
Lujain25 March 2017 at 10:28 #8828LujainBlockedHi Hugo,
I forgot to ask you about which CGAL version did you use before. I tried CGAL4.7 on my machine and it works well. But it met with another problem that is when i made a test about CGALplugin, it informed me about information below:
[INFO] [SofaPython] Added 'F:/SOFA16.12/sofaproject/sofasrc/applications/plugins/image/python' to sys.path [INFO] [SofaPython] Added 'F:/SOFA16.12/sofaproject/sofasrc/applications/plugins/SofaPython/python' to sys.path [INFO] [PluginManager] Loaded plugin: F:/SOFA16.12/sofaproject/sofabuild/bin/Release/SofaPython.dll 0殑!W] [PluginManager] Plugin loading failed (F:/SOFA16.12/sofaproject/sofabuild/bin/Release/CGALPlugin.dll): ~ [INFO] [PluginManager] Loaded plugin: F:/SOFA16.12/sofaproject/sofabuild/bin/Release/image.dll [INFO] [PluginManager] Loaded plugin: F:/SOFA16.12/sofaproject/sofabuild/bin/Release/image_gui.dll [WARNING] [MeshTopology] Could not setup Data link between @generator.outputPoints and points. [WARNING] [MeshTopology] Could not setup Data link between @generator.outputTetras and tetras. [ERROR] [DAGNode "root"] Object type "MeshGenerationFromImage" creation Failed [ERROR] [SceneLoaderXML] Node initialization failed. [WARNING] [VTKExporter] File data/output.vtu NOT FOUND in :F:/SOFA16.12/sofaproject/sofasrc/examples:F:/SOFA16.12/sofaproject/sofasrc/share File data/output.vtu NOT FOUND in :F:/SOFA16.12/sofaproject/sofasrc/examples:F:/SOFA16.12/sofaproject/sofasrc/share Error creating file data/output.vtu
Do you know this kind of problem?
Best wished!
Lujain21 April 2017 at 21:59 #8974HugoKeymasterHi Lujain
The CGAL plugins is indeed not compatible with the latest 4.9 version of CGAL.
Since you opened a new issue for the output problem, I will close this topic. Alright?
In the future, the CGAL SOFA plugin should be made compatible with the 4.9 version.Cheers,
Hugo
22 April 2017 at 03:42 #8982LujainBlockedHi Hugo,
OK,I see.
Looking forward good news.Best Wishes!
Lujain -
AuthorPosts
- You must be logged in to reply to this topic.