after installing Cgal, run the demo program with an error such as "Parse error at" Boost_join ".
The main solution is to refer to this URL.
https://bugreports.qt-project.org/browse/QTBUG-22829
Because it is English, in the poor state of the situation last night, I just did not read. Next talk about this discussion and my own solution. The above problem description is basically this: I originally installed the qt+boost1.47, then I upgraded the BOOST to boost1.48, the result is this problem (my BOOST is 1.53 version): "Parse error at" Boost_join ", Pointing to BOOST/TYPE_TRAITS/DETAIL/HAS_BINARY_OPERATOR.HP (50) and then I switched boost back to 1.47 and there was no such thing. Report my question to the boost team, and the result is a problem with Qt's MOC compiler and boost incompatibility. Several solutions were discussed (Green represents the most feasible solution, can only focus on the green part): Solution 1:
The Boost_join macros that can cause the MOC compiler to crash are mainly in these files:
- Boost\type_traits\detail\has_binary_operator.hpp
- Boost\type_traits\detail\has_postfix_operator.hpp
- Boost\type_traits\detail\has_prefix_operator.hpp
They are eventually included (as the original author thinks) in:
- Boost\type_traits\has_operator.hpp
HAS_OPERATOR.HPP uses the header guards "boost_tt_has_operator_hpp_included", so the organization MOC compiles macros that contain boost_join.
For users who use CMake, the specific actions are:
Qt4_wrap_cpp (Sources ${moc-sources} options-dboost_tt_has_operator_hpp_included)
Solution 2:
This method #ifndef the Q_moc_run, making the MOC invisible using the header file with the Boost_join macro header file
#include <boost/python.hpp>
#endif
Solution 3:
The Qt5.0 has solved the MOC problem. So you can choose to install Qt5.0, but Qt5.0 can only be installed above VS2010, and I'm using VS2008, so I didn't try.
Own Solution :(can be said to be the most lazy method)
Replace the boos1.53 with boost1.47.
In addition, my software version is:
Before change: cgal4.1+Boost1.53+qt4.8.4+libqglviewer2.3.17
After the change: cgal4.1+Boost1.47+qt4.8.4+libqglviewer2.3.17
In addition, my installation process mainly refer to Cgal's website:
Http://www.cgal.org/windows_installation.html
cgal+qt4.84+boost1.53 Error [Parse error at ' Boost_join ']