based on previous blog: http://blog.csdn.net/seamanj/article/details/49368907
To ensure all the projects compiled successfully, 64-bit CGAL4.7 is required. refer to the following blog to config it:
http://blog.csdn.net/seamanj/article/details/51033490
After doing this preparing work, let's begin:
1. download igllib
turn to page :
https://github.com/libigl/libigl/
click "Clone in Desktop" to Clone into your computer somewhere.
here, our clone address is:
C:\work_files
2. config tutorial by cmake
source code: C:/work_files/libigl/tutorial
build the binaries: C:/work_files/libigl/tutorial/build_vs2015_x64
choose Visual Studio 14 2015 Win64 as Generator
if some errors occur at this point, there is a great possibility you download the file through "Download Zip" button. the correct way is through "Clone in Desktop"
3. compile tutorial
Although there are still some errors, we just leave them at that. I will deal with them when necessary.
Last but not least, please comment out the function igl::copyleft::cgal::string_to_mesh_boolean_type like this:
IGL_INLINE bool igl::copyleft::cgal::string_to_mesh_boolean_type(
const std::string & s,
MeshBooleanType & type)
{
/*using namespace std;
string eff_s = s;
transform(eff_s.begin(), eff_s.end(), eff_s.begin(), ::tolower);
const auto & find_any =
[](const vector<string> & haystack, const string & needle)->bool
{
return find(haystack.begin(), haystack.end(), needle) != haystack.end();
};
if(find_any({"union","unite","u","∪"},eff_s))
{
type = MESH_BOOLEAN_TYPE_UNION;
}else if(find_any({"intersect","intersection","i","∩"},eff_s))
{
type = MESH_BOOLEAN_TYPE_INTERSECT;
}else if(
find_any(
{"minus","subtract","difference","relative complement","m","\\"},eff_s))
{
type = MESH_BOOLEAN_TYPE_MINUS;
}else if(find_any({"xor","symmetric difference","x","∆"},eff_s))
{
type = MESH_BOOLEAN_TYPE_XOR;
}else if(find_any({"resolve"},eff_s))
{
type = MESH_BOOLEAN_TYPE_RESOLVE;
}else
{
return false;
}*/
return true;
}