alecjacobson / gptoolbox

Matlab toolbox for Geometry Processing.
MIT License
628 stars 166 forks source link

Compiling mex file: 'intersect_other.cpp' with Windows7 / MATLAB 2015b / VS2013 #10

Closed oqilipo closed 8 years ago

oqilipo commented 8 years ago

Hello

I'm trying to compile 'intersect_other.cpp' & 'mesh_boolean.cpp' on: Windows 7 MATLAB 2015b VS2013

with the following code "compile_gptoolbox_mex_adjusted.m":

path_to_eigen='C:\dev\eigen';
path_to_eltopo='C:\dev\eltopo';
path_to_libigl='C:\dev\libigl';
CGAL='C:\dev\CGAL-4.8-beta1\build';
BOOST='C:\dev\boost_1_60_0';

MEXOPTS={'-v','-largeArrayDims','-DMEX'};
MSSE42='CXXFLAGS=$CXXFLAGS -msse4.2';
STDCPP11='CXXFLAGS=$CXXFLAGS -std=c++11';

% if exist('/usr/local/include/eigen3')
%   EIGEN_INC='-I/usr/local/include/eigen3';
% elseif exist('/opt/local/include/eigen3')
%   EIGEN_INC='-I/opt/local/include/eigen3';
% end
EIGEN_INC=sprintf('-I%s/',path_to_eigen);

ELTOPO_INC= sprintf('-I%s/',path_to_eltopo);
ELTOPO_LIB= strsplit(sprintf('-L%s/eltopo3d -leltopo_release',path_to_eltopo));
CLANG={'CXX=/usr/bin/clang++','LD=/usr/bin/clang++'};
FRAMEWORK_LDFLAGS='LDFLAGS=\$LDFLAGS -framework Foundation -framework AppKit -framework Accelerate';
NOOPT_LDOPTIMFLAGS='LDOPTIMFLAGS="-O "';

% See libigl documentation. In short, Libigl is a header-only library by
% default: no compilation needed (like Eigen). There's an advanced **option**
% to precompile libigl as a static library. This cuts down on compilation time.
% It is optional and more difficult to set up. Set this to true only if you
% know what you're doing.
use_libigl_static_library = false;
LIBIGL_INC=sprintf('-I%s/include',path_to_libigl);
if use_libigl_static_library
  LIBIGL_FLAGS='-DIGL_STATIC_LIBRARY';
  LIBIGL_LIB=sprintf('-L%s/lib -ligl',path_to_libigl);
  LIBIGL_LIBEMBREE='-liglembree';
  LIBIGL_LIBMATLAB='-liglmatlab';
  LIBIGL_LIBCGAL='-liglcgal';
  LIBIGL_LIBBOOLEAN='-liglboolean';
  LIBIGL_LIBSVD3X3='-liglsvd3x3';
else
  % `mex` has a silly requirement that arguments be non-empty, hence the NOOP
  % defines
  LIBIGL_FLAGS='-DIGL_SKIP';
  LIBIGL_LIB='-DIGL_SKIP';
  LIBIGL_LIBMATLAB='-DIGL_SKIP';
  LIBIGL_LIBEMBREE='-DIGL_SKIP';
  LIBIGL_LIBCGAL='-DIGL_SKIP';
  LIBIGL_LIBBOOLEAN='-DIGL_SKIP';
  LIBIGL_LIBSVD3X3='-DIGL_SKIP';
end
LIBIGL_BASE={LIBIGL_INC,LIBIGL_FLAGS,LIBIGL_LIB,LIBIGL_LIBMATLAB};

SVD_INC=sprintf('-I%s/external/Singular_Value_Decomposition/',path_to_libigl);

EMBREE=[path_to_libigl '/external/embree'];
EMBREE_INC=strsplit(sprintf('-I%s -I%s/include/',EMBREE,EMBREE));
EMBREE_LIB=strsplit(sprintf('-L%s/build -lembree -lsys',EMBREE));

CORK=[path_to_libigl '/external/cork'];
CORK_INC=sprintf('-I%s/include',CORK);
CORK_LIB=strsplit(sprintf('-L%s/lib -lcork',CORK));

% if exist('/usr/local/include/CGAL')
%   CGAL='/usr/local/';
% elseif exist('/opt/local/include/CGAL')
%   CGAL='/opt/local/';
% end

CGAL_INC=sprintf('-I%s/include',CGAL);
CGAL_LIB=strsplit(sprintf('-L%s/lib -lCGAL -lCGAL_Core -lgmp -lmpfr',CGAL));
CGAL_FLAGS='CXXFLAGS=\$CXXFLAGS -frounding-math';

% BOOST='/opt/local/';
BOOST_INC=sprintf('-I%s/include',BOOST);
BOOST_LIB=strsplit(sprintf('-L%s/lib -lboost_thread-mt -lboost_system-mt',BOOST));

mex( ...
  MEXOPTS{:}, MSSE42, STDCPP11, ...
  LIBIGL_BASE{:},EIGEN_INC, ...
  LIBIGL_LIBCGAL, ...
  CGAL_INC,CGAL_LIB{:},CGAL_FLAGS, ...
  BOOST_INC,BOOST_LIB{:}, ...
  'intersect_other.cpp');

mex( ...
  MEXOPTS{:}, MSSE42, STDCPP11, ...
  LIBIGL_BASE{:},EIGEN_INC, ...
  CGAL_INC,CGAL_LIB{:},CGAL_FLAGS, ...
  LIBIGL_LIBCGAL, LIBIGL_LIBBOOLEAN, ...
  CORK_INC,CORK_LIB{:}, ...
  BOOST_INC,BOOST_LIB{:}, ...
  'mesh_boolean.cpp');

But I get the following error:

Verbose mode is on.
... Looking for compiler 'Microsoft Windows SDK 7.1 (C++)' ...
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1' InstallationFolder ...Yes ('C:\Program Files\Microsoft SDKs\Windows\v7.1\').
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7' 10.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\').
... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\cl.exe' ...Yes.
... Looking for folder 'C:\Program Files (x86)\Microsoft Visual Studio 10.0' ...Yes.
Found installed compiler 'Microsoft Windows SDK 7.1 (C++)'.
Set PATH = C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\VCPackages;C:\Program Files\Microsoft SDKs\Windows\v7.1\\Bin\x64;C:\Program Files\Microsoft SDKs\Windows\v7.1\\Bin;;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\MATLAB\R2015b\runtime\win64;C:\Program Files\MATLAB\R2015b\bin;C:\Program Files\MATLAB\R2015a\runtime\win64;C:\Program Files\MATLAB\R2015a\bin;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\WinBuilds\bin;C:\Program Files\MITK 2015.5.2\bin;C:\Program Files\TortoiseGit\bin;C:\ndigital\programs;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\CMake\bin;C:\dev\boost_1_60_0\lib64-msvc-11.0;C:\dev\CGAL-4.8-beta1\auxiliary\gmp\lib;C:\Program Files\TortoiseHg\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\
Set INCLUDE = C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v7.1\\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v7.1\\INCLUDE\gl;C:\Program Files\MATLAB\R2015b\extern\include;;
Set LIB = C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Lib\amd64;C:\Program Files\Microsoft SDKs\Windows\v7.1\\Lib\X64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB\AMD64;C:\Program Files\MATLAB\R2015b\lib\win64;C:\Program Files\MATLAB\R2015b\extern\lib\win64;
Set LIBPATH = C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Lib\amd64;C:\Program Files\Microsoft SDKs\Windows\v7.1\\LIB\X64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB\AMD64;C:\Program Files\MATLAB\R2015b\extern\lib\win64;
Error using mex
MEX cannot find library 'CGAL' specified with the -l option.
 MEX looks for a file with one of the names:
 CGAL.lib
 libCGAL.lib
 Please specify the path to this library with the -L option.

Error in compile_gptoolbox_mex_adjusted (line 77)
mex( ...

Would appreciate any help

Thanks in advance

alecjacobson commented 8 years ago

Seems like you need to install CGAL.

On Thu, Mar 3, 2016 at 6:16 AM, oqilipo notifications@github.com wrote:

Hello

I'm trying to compile 'intersect_other.cpp' & 'mesh_boolean.cpp' on: Windows 7 MATLAB 2015b VS2013

with the following code "compile_gptoolbox_mex_adjusted.m":

path_to_eigen='C:\dev\eigen'; path_to_eltopo='C:\dev\eltopo'; path_to_libigl='C:\dev\libigl'; CGAL='C:\dev\CGAL-4.8-beta1'; BOOST='C:\dev\boost_1_60_0';

MEXOPTS={'-v','-largeArrayDims','-DMEX'}; MSSE42='CXXFLAGS=$CXXFLAGS -msse4.2'; STDCPP11='CXXFLAGS=$CXXFLAGS -std=c++11';

% if exist('/usr/local/include/eigen3') % EIGEN_INC='-I/usr/local/include/eigen3'; % elseif exist('/opt/local/include/eigen3') % EIGEN_INC='-I/opt/local/include/eigen3'; % end EIGEN_INC=sprintf('-I%s/',path_to_eigen);

ELTOPO_INC= sprintf('-I%s/',path_to_eltopo); ELTOPO_LIB= strsplit(sprintf('-L%s/eltopo3d -leltopo_release',path_to_eltopo)); CLANG={'CXX=/usr/bin/clang++','LD=/usr/bin/clang++'}; FRAMEWORK_LDFLAGS='LDFLAGS=\$LDFLAGS -framework Foundation -framework AppKit -framework Accelerate'; NOOPT_LDOPTIMFLAGS='LDOPTIMFLAGS="-O "';

% See libigl documentation. In short, Libigl is a header-only library by % default: no compilation needed (like Eigen). There's an advanced option % to precompile libigl as a static library. This cuts down on compilation time. % It is optional and more difficult to set up. Set this to true only if you % know what you're doing. use_libigl_static_library = false; LIBIGL_INC=sprintf('-I%s/include',path_to_libigl); if use_libigl_static_library LIBIGL_FLAGS='-DIGL_STATIC_LIBRARY'; LIBIGL_LIB=sprintf('-L%s/lib -ligl',path_to_libigl); LIBIGL_LIBEMBREE='-liglembree'; LIBIGL_LIBMATLAB='-liglmatlab'; LIBIGL_LIBCGAL='-liglcgal'; LIBIGL_LIBBOOLEAN='-liglboolean'; LIBIGL_LIBSVD3X3='-liglsvd3x3'; else % mex has a silly requirement that arguments be non-empty, hence the NOOP % defines LIBIGL_FLAGS='-DIGL_SKIP'; LIBIGL_LIB='-DIGL_SKIP'; LIBIGL_LIBMATLAB='-DIGL_SKIP'; LIBIGL_LIBEMBREE='-DIGL_SKIP'; LIBIGL_LIBCGAL='-DIGL_SKIP'; LIBIGL_LIBBOOLEAN='-DIGL_SKIP'; LIBIGL_LIBSVD3X3='-DIGL_SKIP'; end LIBIGL_BASE={LIBIGL_INC,LIBIGL_FLAGS,LIBIGL_LIB,LIBIGL_LIBMATLAB};

SVD_INC=sprintf('-I%s/external/Singular_Value_Decomposition/',path_to_libigl);

EMBREE=[path_to_libigl '/external/embree']; EMBREE_INC=strsplit(sprintf('-I%s -I%s/include/',EMBREE,EMBREE)); EMBREE_LIB=strsplit(sprintf('-L%s/build -lembree -lsys',EMBREE));

CORK=[path_to_libigl '/external/cork']; CORK_INC=sprintf('-I%s/include',CORK); CORK_LIB=strsplit(sprintf('-L%s/lib -lcork',CORK));

% if exist('/usr/local/include/CGAL') % CGAL='/usr/local/'; % elseif exist('/opt/local/include/CGAL') % CGAL='/opt/local/'; % end

CGAL_INC=sprintf('-I%s/include',CGAL); CGAL_LIB=strsplit(sprintf('-L%s/lib -lCGAL -lCGAL_Core -lgmp -lmpfr',CGAL)); CGAL_FLAGS='CXXFLAGS=\$CXXFLAGS -frounding-math';

% BOOST='/opt/local/'; BOOST_INC=sprintf('-I%s/include',BOOST); BOOST_LIB=strsplit(sprintf('-L%s/lib -lboost_thread-mt -lboost_system-mt',BOOST));

mex( ... MEXOPTS{:}, MSSE42, STDCPP11, ... LIBIGL_BASE{:},EIGEN_INC, ... LIBIGL_LIBCGAL, ... CGAL_INC,CGAL_LIB{:},CGAL_FLAGS, ... BOOST_INC,BOOST_LIB{:}, ... 'intersect_other.cpp');

mex( ... MEXOPTS{:}, MSSE42, STDCPP11, ... LIBIGL_BASE{:},EIGEN_INC, ... CGAL_INC,CGAL_LIB{:},CGAL_FLAGS, ... LIBIGL_LIBCGAL, LIBIGL_LIBBOOLEAN, ... CORK_INC,CORK_LIB{:}, ... BOOST_INC,BOOST_LIB{:}, ... 'mesh_boolean.cpp');

But I get the following error:

Verbose mode is on. ... Looking for compiler 'Microsoft Windows SDK 7.1 (C++)' ... ... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1' InstallationFolder ...Yes ('C:\Program Files\Microsoft SDKs\Windows\v7.1\'). ... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7' 10.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\'). ... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\cl.exe' ...Yes. ... Looking for folder 'C:\Program Files (x86)\Microsoft Visual Studio 10.0' ...Yes. Found installed compiler 'Microsoft Windows SDK 7.1 (C++)'. Set PATH = C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\VCPackages;C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\x64;C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin;;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\MATLAB\R2015b\runtime\win64;C:\Program Files\MATLAB\R2015b\bin;C:\Program Files\MATLAB\R2015a\runtime\win64;C:\Program Files\MATLAB\R2015a\bin;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\WinBuilds\bin;C:\Program File s\MITK 2 015.5.2\bin;C:\Program Files\TortoiseGit\bin;C:\ndigital\programs;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\CMake\bin;C:\dev\boost_1_60_0\lib64-msvc-11.0;C:\dev\CGAL-4.8-beta1\auxiliary\gmp\lib;C:\Program Files\TortoiseHg\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\ Set INCLUDE = C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\gl;C:\Program Files\MATLAB\R2015b\extern\include;; Set LIB = C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Lib\amd64;C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\X64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB\AMD64;C:\Program Files\MATLAB\R2015b\lib\win64;C:\Program Files\MATLAB\R2015b\extern\lib\win64; Set LIBPATH = C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Lib\amd64;C:\Program Files\Microsoft SDKs\Windows\v7.1\LIB\X64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB\AMD64;C:\Program Files\MATLAB\R2015b\extern\lib\win64; Error using mex MEX cannot find library 'CGAL' specified with the -l option. MEX looks for a file with one of the names: CGAL.lib libCGAL.lib Please specify the path to this library with the -L option.

Error in compile_gptoolbox_mex_adjusted (line 77) mex( ...

Would appreciate any help

Thanks in advance

— Reply to this email directly or view it on GitHub https://github.com/alecjacobson/gptoolbox/issues/10.

oqilipo commented 8 years ago

Hi Alec

I've installed CGAL as explained here: http://www.cgal.org/download/windows.html and the CGAL demo "Triangulation_3" works: triangulation_demo_3

But there is no file "CGAL.lib" in the folder: "C:\dev\CGAL-4.8-beta1\build\lib". There are the following files:

Same for boost: Following files are in the folder "C:\dev\boost_1_59_0\lib64-msvc-12.0" amongst others :

Thanks for you help

oqilipo commented 8 years ago

I've changed the "compile_gptoolbox_mex_adjusted.m" and all library files for "intersect_other.cpp' are found.

path_to_eigen='C:/dev/eigen';
path_to_eltopo='C:/dev/eltopo';
path_to_libigl='C:/dev/libigl';
CGAL='C:/dev/CGAL-4.8-beta1/build';
BOOST='C:/dev/boost_1_59_0/lib64-msvc-12.0';

MEXOPTS={'-v','-largeArrayDims','-DMEX'};
MSSE42='CXXFLAGS=$CXXFLAGS -msse4.2';
STDCPP11='CXXFLAGS=$CXXFLAGS -std=c++11';

EIGEN_INC=sprintf('-I%s/',path_to_eigen);

ELTOPO_INC= sprintf('-I%s/',path_to_eltopo);
ELTOPO_LIB= strsplit(sprintf('-L%s/eltopo3d -leltopo_release',path_to_eltopo));
CLANG={'CXX=/usr/bin/clang++','LD=/usr/bin/clang++'};
FRAMEWORK_LDFLAGS='LDFLAGS=\$LDFLAGS -framework Foundation -framework AppKit -framework Accelerate';
NOOPT_LDOPTIMFLAGS='LDOPTIMFLAGS="-O "';

% See libigl documentation. In short, Libigl is a header-only library by
% default: no compilation needed (like Eigen). There's an advanced **option**
% to precompile libigl as a static library. This cuts down on compilation time.
% It is optional and more difficult to set up. Set this to true only if you
% know what you're doing.
use_libigl_static_library = false;
LIBIGL_INC=sprintf('-I%s/include',path_to_libigl);
if use_libigl_static_library
  LIBIGL_FLAGS='-DIGL_STATIC_LIBRARY';
  LIBIGL_LIB=sprintf('-L%s/lib -ligl',path_to_libigl);
  LIBIGL_LIBEMBREE='-liglembree';
  LIBIGL_LIBMATLAB='-liglmatlab';
  LIBIGL_LIBCGAL='-liglcgal';
  LIBIGL_LIBBOOLEAN='-liglboolean';
  LIBIGL_LIBSVD3X3='-liglsvd3x3';
else
  % `mex` has a silly requirement that arguments be non-empty, hence the NOOP
  % defines
  LIBIGL_FLAGS='-DIGL_SKIP';
  LIBIGL_LIB='-DIGL_SKIP';
  LIBIGL_LIBMATLAB='-DIGL_SKIP';
  LIBIGL_LIBEMBREE='-DIGL_SKIP';
  LIBIGL_LIBCGAL='-DIGL_SKIP';
  LIBIGL_LIBBOOLEAN='-DIGL_SKIP';
  LIBIGL_LIBSVD3X3='-DIGL_SKIP';
end
LIBIGL_BASE={LIBIGL_INC,LIBIGL_FLAGS,LIBIGL_LIB,LIBIGL_LIBMATLAB};

SVD_INC=sprintf('-I%s/external/Singular_Value_Decomposition/',path_to_libigl);

EMBREE=[path_to_libigl '/external/embree'];
EMBREE_INC=strsplit(sprintf('-I%s -I%s/include/',EMBREE,EMBREE));
EMBREE_LIB=strsplit(sprintf('-L%s/build -lembree -lsys',EMBREE));

CORK=[path_to_libigl '/external/cork'];
CORK_INC=sprintf('-I%s/include',CORK);
CORK_LIB=strsplit(sprintf('-L%s/lib -lcork',CORK));

CGAL_INC=sprintf('-I%s/include',CGAL);
CGAL_LIB=strsplit(sprintf('-L%s/lib -lCGAL-vc120-mt-4.8 -lCGAL_Core-vc120-mt-4.8 -llibgmp-10.lib -llibmpfr-4.lib',CGAL));
CGAL_FLAGS='CXXFLAGS=\$CXXFLAGS -frounding-math';

BOOST_INC=sprintf('-I%s',BOOST);
BOOST_LIB=strsplit(sprintf('-L%s -lboost_thread-vc120-mt-1_59 -lboost_system-vc120-mt-1_59',BOOST));

mex( ...
  MEXOPTS{:}, MSSE42, STDCPP11, ...
  LIBIGL_BASE{:},EIGEN_INC, ...
  LIBIGL_LIBCGAL, ...
  CGAL_INC,CGAL_LIB{:},CGAL_FLAGS, ...
  BOOST_INC,BOOST_LIB{:}, ...
  'intersect_other.cpp');

mex( ...
  MEXOPTS{:}, MSSE42, STDCPP11, ...
  LIBIGL_BASE{:},EIGEN_INC, ...
  CGAL_INC,CGAL_LIB{:},CGAL_FLAGS, ...
  LIBIGL_LIBCGAL, LIBIGL_LIBBOOLEAN, ...
  CORK_INC,CORK_LIB{:}, ...
  BOOST_INC,BOOST_LIB{:}, ...
  'mesh_boolean.cpp');

Unfortunately there are a lot of compiling errors:

compile_gptoolbox_mex_adjusted
Verbose mode is on.
... Looking for compiler 'Microsoft Visual C++ 2013 Professional' ...
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 12.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\').
... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\cl.exe' ...Yes.
... Looking for folder 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC' ...Yes.
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1' InstallationFolder ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1' InstallationFolder ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1' InstallationFolder ...Yes ('C:\Program Files (x86)\Windows Kits\8.1\').
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 12.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\').
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VC7' 12.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VC7' 12.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7' 12.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\').
... Looking for environment variable 'VS120COMNTOOLS' ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\').
... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe' ...Yes.
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 12.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\').
... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat' ...Yes.
... Looking for folder 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC' ...Yes.
Found installed compiler 'Microsoft Visual C++ 2013 Professional'.
Set PATH = C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\Bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\Bin\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\..\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\..\Common7\Tools;C:\Program Files (x86)\Windows Kits\8.1\\Bin\x64;C:\Program Files (x86)\Windows Kits\8.1\\Bin\x86;;C:\Windows;C:\Qt\Qt5.5.1\5.5\msvc2013_64\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\MATLAB\R2015b\runtime\win64;C:\Program Files\MATLAB\R2015b\bin;C:\Program Files\MATLAB\R2015a\runtime\win64;C:\Program Files\MATLAB\R2015a\bin;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\WinBuilds\bin;C:\Program Files\MITK 2015.5.2\bin;C:\Program Files\TortoiseGit\bin;C:\ndigital\programs;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\CMake\bin;C:\dev\boost_1_60_0\lib64-msvc-12.0;C:\dev\CGAL-4.8-beta1\auxiliary\gmp\lib;C:\Program Files\TortoiseHg\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\dev\libQGLViewer-2.6.3\QGLViewer\release;C:\dev\libQGLViewer-2.6.3\QGLViewer\debug;C:\dev\CGAL-4.8-beta1\build\bin
Set INCLUDE = C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\ATLMFC\INCLUDE;C:\Program Files (x86)\Windows Kits\8.1\\include\shared;C:\Program Files (x86)\Windows Kits\8.1\\include\um;C:\Program Files (x86)\Windows Kits\8.1\\include\winrt;C:\Program Files\MATLAB\R2015b\extern\include;
Set LIB = C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\Lib\amd64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\ATLMFC\Lib\amd64;C:\Program Files (x86)\Windows Kits\8.1\\lib\winv6.3\um\x64;C:\Program Files\MATLAB\R2015b\lib\win64;
Set LIBPATH = C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\Lib\amd64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\ATLMFC\Lib\amd64;
Options file details
-------------------------------------------------------------------
    Compiler location: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\..\
    Options file: C:\Users\NAME\AppData\Roaming\MathWorks\MATLAB\R2015b\mex_C++_win64.xml
    CMDLINE100 : cl /c /Zp8 /GR /W3 /EHs /nologo /MD /O2 /Oy- /DNDEBUG /DMEX  /DIGL_SKIP  /DIGL_SKIP  /DIGL_SKIP  /DIGL_SKIP   /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE -IC:/dev/libigl/include -IC:/dev/eigen/ -IC:/dev/CGAL-4.8-beta1/build/include -IC:/dev/boost_1_59_0/lib64-msvc-12.0  -I"C:\Program Files\MATLAB\R2015b\extern\include" -I"C:\Program Files\MATLAB\R2015b\simulink\include" D:\FFF\Code\#Extern\#Mesh\gptoolbox\mex\intersect_other.cpp /FoC:\Users\NAMEAppData\Local\Temp\mex_1686555835098469_6192\intersect_other.obj
    CMDLINE200 : link /nologo /manifest  /DLL  /EXPORT:mexFunction C:\Users\NAME\AppData\Local\Temp\mex_1686555835098469_6192\intersect_other.obj  CGAL-vc120-mt-4.8.lib CGAL_Core-vc120-mt-4.8.lib libgmp-10.lib libmpfr-4.lib libboost_thread-vc120-mt-1_59.lib libboost_system-vc120-mt-1_59.lib  /LIBPATH:C:/dev/CGAL-4.8-beta1/build/lib  /LIBPATH:C:/dev/boost_1_59_0/lib64-msvc-12.0   /LIBPATH:"C:\Program Files\MATLAB\R2015b\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /out:intersect_other.mexw64
    CMDLINE250 : mt -outputresource:intersect_other.mexw64;2 -manifest intersect_other.mexw64.manifest
    CMDLINE300 : del intersect_other.exp intersect_other.lib intersect_other.mexw64.manifest intersect_other.ilk
    COMPILER : cl
    COMPFLAGS : /Zp8 /GR /W3 /EHs /nologo /MD
    COMPDEFINES : /DMEX  /DIGL_SKIP  /DIGL_SKIP  /DIGL_SKIP  /DIGL_SKIP   /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE
    MATLABMEX :  /DMATLAB_MEX_FILE
    OPTIMFLAGS : /O2 /Oy- /DNDEBUG
    INCLUDE : -IC:/dev/libigl/include -IC:/dev/eigen/ -IC:/dev/CGAL-4.8-beta1/build/include -IC:/dev/boost_1_59_0/lib64-msvc-12.0  -I"C:\Program Files\MATLAB\R2015b\extern\include" -I"C:\Program Files\MATLAB\R2015b\simulink\include"
    DEBUGFLAGS : /Z7
    LINKER : link
    LINKFLAGS : /nologo /manifest 
    LINKTYPE : /DLL
    LINKEXPORT : /EXPORT:mexFunction
    LINKLIBS : CGAL-vc120-mt-4.8.lib CGAL_Core-vc120-mt-4.8.lib libgmp-10.lib libmpfr-4.lib libboost_thread-vc120-mt-1_59.lib libboost_system-vc120-mt-1_59.lib  /LIBPATH:C:/dev/CGAL-4.8-beta1/build/lib  /LIBPATH:C:/dev/boost_1_59_0/lib64-msvc-12.0   /LIBPATH:"C:\Program Files\MATLAB\R2015b\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
    LINKDEBUGFLAGS : /debug /PDB:"intersect_other.mexw64.pdb"
    LINKOPTIMFLAGS : 
    OBJEXT : .obj
    LDEXT : .mexw64
    SETENV : set COMPILER=cl 
                set COMPFLAGS=/c /Zp8 /GR /W3 /EHs /nologo /MD /DMEX  /DIGL_SKIP  /DIGL_SKIP  /DIGL_SKIP  /DIGL_SKIP   /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE 
                set OPTIMFLAGS=/O2 /Oy- /DNDEBUG 
                set DEBUGFLAGS=/Z7 
                set LINKER=link 
                set LINKFLAGS=/nologo /manifest  /export:%ENTRYPOINT% /DLL libCGAL-vc120-mt-4.8.lib CGAL-vc120-mt-4.8.lib  libCGAL_Core-vc120-mt-4.8.lib CGAL_Core-vc120-mt-4.8.lib  liblibgmp-10.lib libgmp-10.lib  liblibmpfr-4.lib libmpfr-4.lib  libboost_thread-vc120-mt-1_59.lib boost_thread-vc120-mt-1_59.lib  libboost_system-vc120-mt-1_59.lib boost_system-vc120-mt-1_59.lib   /LIBPATH:C:/dev/CGAL-4.8-beta1/build/lib  /LIBPATH:C:/dev/boost_1_59_0/lib64-msvc-12.0   /LIBPATH:"C:\Program Files\MATLAB\R2015b\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /EXPORT:mexFunction 
                set LINKDEBUGFLAGS=/debug /PDB:"%OUTDIR%%MEX_NAME%.mexw64.pdb" 
                set NAME_OUTPUT=/out:"%OUTDIR%%MEX_NAME%%MEX_EXT%"
    VCROOT : C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC
    SDKROOT : C:\Program Files (x86)\Windows Kits\8.1\
    VSINSTALLDIR : C:\Program Files (x86)\Microsoft Visual Studio 12.0\
    VCINSTALLDIR : C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\
    PROF_ENV : C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe
    VCVARSALLDIR : C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC
    MATLABROOT : C:\Program Files\MATLAB\R2015b
    ARCH : win64
    SRC : D:\FFF\Code\#Extern\#Mesh\gptoolbox\mex\intersect_other.cpp
    OBJ : C:\Users\NAME\AppData\Local\Temp\mex_1686555835098469_6192\intersect_other.obj
    OBJS : C:\Users\NAME\AppData\Local\Temp\mex_1686555835098469_6192\intersect_other.obj 
    SRCROOT : D:\FFF\Code\#Extern\#Mesh\gptoolbox\mex\intersect_other
    DEF : C:\Users\NAME\AppData\Local\Temp\mex_1686555835098469_6192\intersect_other.def
    EXP : intersect_other.exp
    LIB : intersect_other.lib
    EXE : intersect_other.mexw64
    ILK : intersect_other.ilk
    MANIFEST : intersect_other.mexw64.manifest
    TEMPNAME : intersect_other
    EXEDIR : 
    EXENAME : intersect_other
    CXXFLAGS : \ -msse4.2 -std=c++11 -frounding-math
    OPTIM : /O2 /Oy- /DNDEBUG
    LINKOPTIM : 
-------------------------------------------------------------------
Building with 'Microsoft Visual C++ 2013 Professional'.
cl /c /Zp8 /GR /W3 /EHs /nologo /MD /O2 /Oy- /DNDEBUG /DMEX  /DIGL_SKIP  /DIGL_SKIP  /DIGL_SKIP  /DIGL_SKIP   /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE -IC:/dev/libigl/include -IC:/dev/eigen/ -IC:/dev/CGAL-4.8-beta1/build/include -IC:/dev/boost_1_59_0/lib64-msvc-12.0  -I"C:\Program Files\MATLAB\R2015b\extern\include" -I"C:\Program Files\MATLAB\R2015b\simulink\include" D:\FFF\Code\#Extern\#Mesh\gptoolbox\mex\intersect_other.cpp /FoC:\Users\NAME\AppData\Local\Temp\mex_1686555835098469_6192\intersect_other.obj
Error using mex
intersect_other.cpp
c:\dev\libigl\include\igl\ply.h(482) : warning C4996: 'strdup': The POSIX name for this item is deprecated.
Instead, use the ISO C++ conformant name: _strdup. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245): Siehe Deklaration von
        'strdup'
c:\dev\libigl\include\igl\ply.h(520) : warning C4267: 'Argument': Konvertierung von 'size_t' nach 'int',
Datenverlust m”glich
c:\dev\libigl\include\igl\ply.h(957) : warning C4996: 'strdup': The POSIX name for this item is deprecated.
Instead, use the ISO C++ conformant name: _strdup. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245): Siehe Deklaration von
        'strdup'
c:\dev\libigl\include\igl\ply.h(981) : warning C4996: 'strdup': The POSIX name for this item is deprecated.
Instead, use the ISO C++ conformant name: _strdup. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245): Siehe Deklaration von
        'strdup'
c:\dev\libigl\include\igl\ply.h(1070) : warning C4244: '=': Konvertierung von 'double' in 'float', m”glicher
Datenverlust
c:\dev\libigl\include\igl\ply.h(1106) : warning C4996: 'strdup': The POSIX name for this item is deprecated.
Instead, use the ISO C++ conformant name: _strdup. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245): Siehe Deklaration von
        'strdup'
c:\dev\libigl\include\igl\ply.h(1488) : warning C4996: 'strdup': The POSIX name for this item is deprecated.
Instead, use the ISO C++ conformant name: _strdup. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245): Siehe Deklaration von
        'strdup'
c:\dev\libigl\include\igl\ply.h(1587) : warning C4996: 'strdup': The POSIX name for this item is deprecated.
Instead, use the ISO C++ conformant name: _strdup. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245): Siehe Deklaration von
        'strdup'
c:\dev\libigl\include\igl\ply.h(1644) : warning C4996: 'strdup': The POSIX name for this item is deprecated.
Instead, use the ISO C++ conformant name: _strdup. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245): Siehe Deklaration von
        'strdup'
c:\dev\libigl\include\igl\ply.h(2477) : warning C4244: '=': Konvertierung von 'double' in 'float', m”glicher
Datenverlust
c:\dev\libigl\include\igl\ply.h(2891) : warning C4244: '=': Konvertierung von 'double' in 'float', m”glicher
Datenverlust
c:\dev\libigl\include\igl\ply.h(2919) : warning C4996: 'strdup': The POSIX name for this item is deprecated.
Instead, use the ISO C++ conformant name: _strdup. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245): Siehe Deklaration von
        'strdup'
c:\dev\libigl\include\igl\ply.h(2984) : warning C4996: 'strdup': The POSIX name for this item is deprecated.
Instead, use the ISO C++ conformant name: _strdup. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245): Siehe Deklaration von
        'strdup'
c:\dev\libigl\include\igl\ply.h(2989) : warning C4996: 'strdup': The POSIX name for this item is deprecated.
Instead, use the ISO C++ conformant name: _strdup. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245): Siehe Deklaration von
        'strdup'
c:\dev\libigl\include\igl\ply.h(3056) : warning C4996: 'strdup': The POSIX name for this item is deprecated.
Instead, use the ISO C++ conformant name: _strdup. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245): Siehe Deklaration von
        'strdup'
C:/dev/libigl/include\igl/matlab/prepare_lhs.h(40) : error C2039: 'SparseMatrix': Ist kein Element von 'Eigen'
C:/dev/libigl/include\igl/matlab/prepare_lhs.h(40) : error C4430: Fehlender Typspezifizierer - int wird
angenommen. Hinweis: "default-int" wird von C++ nicht untersttzt.
C:/dev/libigl/include\igl/matlab/prepare_lhs.h(40) : error C2143: Syntaxfehler: Es fehlt ',' vor '<'
c:\dev\libigl\include\igl\matlab\prepare_lhs.cpp(62) : error C2039: 'SparseMatrix': Ist kein Element von 'Eigen'
c:\dev\libigl\include\igl\matlab\prepare_lhs.cpp(62) : error C4430: Fehlender Typspezifizierer - int wird
angenommen. Hinweis: "default-int" wird von C++ nicht untersttzt.
c:\dev\libigl\include\igl\matlab\prepare_lhs.cpp(62) : warning C4346: 'igl::matlab::prepare_lhs_double':
Abh„ngiger Name ist kein Typ
        Pr„fix mit 'typename' zum Angeben eines Typs
c:\dev\libigl\include\igl\matlab\prepare_lhs.cpp(62) : error C2143: Syntaxfehler: Es fehlt ',' vor '<'
c:\dev\libigl\include\igl\copyleft\cgal\CGAL_includes.hpp(17) : fatal error C1083: Datei (Include) kann nicht
ge”ffnet werden: "CGAL/intersections.h": No such file or directory

Error in compile_gptoolbox_mex_adjusted (line 78)
mex( ...

I replaced "strdup" with "_strdup" in "c:\dev\libigl\include\igl\ply.h"

But my C++ skills are very limited, would be great if you could help to fix the other errors:

Error using mex
intersect_other.cpp
c:\dev\libigl\include\igl\ply.h(520) : warning C4267: 'Argument': Konvertierung von 'size_t' nach 'int',
Datenverlust m”glich
c:\dev\libigl\include\igl\ply.h(1070) : warning C4244: '=': Konvertierung von 'double' in 'float', m”glicher
Datenverlust
c:\dev\libigl\include\igl\ply.h(2477) : warning C4244: '=': Konvertierung von 'double' in 'float', m”glicher
Datenverlust
c:\dev\libigl\include\igl\ply.h(2891) : warning C4244: '=': Konvertierung von 'double' in 'float', m”glicher
Datenverlust
C:/dev/libigl/include\igl/matlab/prepare_lhs.h(40) : error C2039: 'SparseMatrix': Ist kein Element von 'Eigen'
C:/dev/libigl/include\igl/matlab/prepare_lhs.h(40) : error C4430: Fehlender Typspezifizierer - int wird
angenommen. Hinweis: "default-int" wird von C++ nicht untersttzt.
C:/dev/libigl/include\igl/matlab/prepare_lhs.h(40) : error C2143: Syntaxfehler: Es fehlt ',' vor '<'
c:\dev\libigl\include\igl\matlab\prepare_lhs.cpp(62) : error C2039: 'SparseMatrix': Ist kein Element von 'Eigen'
c:\dev\libigl\include\igl\matlab\prepare_lhs.cpp(62) : error C4430: Fehlender Typspezifizierer - int wird
angenommen. Hinweis: "default-int" wird von C++ nicht untersttzt.
c:\dev\libigl\include\igl\matlab\prepare_lhs.cpp(62) : warning C4346: 'igl::matlab::prepare_lhs_double':
Abh„ngiger Name ist kein Typ
        Pr„fix mit 'typename' zum Angeben eines Typs
c:\dev\libigl\include\igl\matlab\prepare_lhs.cpp(62) : error C2143: Syntaxfehler: Es fehlt ',' vor '<'
c:\dev\libigl\include\igl\copyleft\cgal\CGAL_includes.hpp(17) : fatal error C1083: Datei (Include) kann nicht
ge”ffnet werden: "CGAL/intersections.h": No such file or directory

Error in compile_gptoolbox_mex_adjusted (line 78)
mex( ...

Thanks in advance

alecjacobson commented 8 years ago

The first error is fixed in the latest version of libigl, please git pull that library.

For the second error it seems that your CGAL_INC path variable is not the same as the place where you've found intersections.h

On Wed, Mar 9, 2016 at 4:31 AM, oqilipo notifications@github.com wrote:

I've changed the "compile_gptoolbox_mex_adjusted.m" and all library files for "intersect_other.cpp' are found.

path_to_eigen='C:/dev/eigen'; path_to_eltopo='C:/dev/eltopo'; path_to_libigl='C:/dev/libigl'; CGAL='C:/dev/CGAL-4.8-beta1/build'; BOOST='C:/dev/boost_1_59_0/lib64-msvc-12.0';

MEXOPTS={'-v','-largeArrayDims','-DMEX'}; MSSE42='CXXFLAGS=$CXXFLAGS -msse4.2'; STDCPP11='CXXFLAGS=$CXXFLAGS -std=c++11';

EIGEN_INC=sprintf('-I%s/',path_to_eigen);

ELTOPO_INC= sprintf('-I%s/',path_to_eltopo); ELTOPO_LIB= strsplit(sprintf('-L%s/eltopo3d -leltopo_release',path_to_eltopo)); CLANG={'CXX=/usr/bin/clang++','LD=/usr/bin/clang++'}; FRAMEWORK_LDFLAGS='LDFLAGS=\$LDFLAGS -framework Foundation -framework AppKit -framework Accelerate'; NOOPT_LDOPTIMFLAGS='LDOPTIMFLAGS="-O "';

% See libigl documentation. In short, Libigl is a header-only library by % default: no compilation needed (like Eigen). There's an advanced option % to precompile libigl as a static library. This cuts down on compilation time. % It is optional and more difficult to set up. Set this to true only if you % know what you're doing. use_libigl_static_library = false; LIBIGL_INC=sprintf('-I%s/include',path_to_libigl); if use_libigl_static_library LIBIGL_FLAGS='-DIGL_STATIC_LIBRARY'; LIBIGL_LIB=sprintf('-L%s/lib -ligl',path_to_libigl); LIBIGL_LIBEMBREE='-liglembree'; LIBIGL_LIBMATLAB='-liglmatlab'; LIBIGL_LIBCGAL='-liglcgal'; LIBIGL_LIBBOOLEAN='-liglboolean'; LIBIGL_LIBSVD3X3='-liglsvd3x3'; else % mex has a silly requirement that arguments be non-empty, hence the NOOP % defines LIBIGL_FLAGS='-DIGL_SKIP'; LIBIGL_LIB='-DIGL_SKIP'; LIBIGL_LIBMATLAB='-DIGL_SKIP'; LIBIGL_LIBEMBREE='-DIGL_SKIP'; LIBIGL_LIBCGAL='-DIGL_SKIP'; LIBIGL_LIBBOOLEAN='-DIGL_SKIP'; LIBIGL_LIBSVD3X3='-DIGL_SKIP'; end LIBIGL_BASE={LIBIGL_INC,LIBIGL_FLAGS,LIBIGL_LIB,LIBIGL_LIBMATLAB};

SVD_INC=sprintf('-I%s/external/Singular_Value_Decomposition/',path_to_libigl);

EMBREE=[path_to_libigl '/external/embree']; EMBREE_INC=strsplit(sprintf('-I%s -I%s/include/',EMBREE,EMBREE)); EMBREE_LIB=strsplit(sprintf('-L%s/build -lembree -lsys',EMBREE));

CORK=[path_to_libigl '/external/cork']; CORK_INC=sprintf('-I%s/include',CORK); CORK_LIB=strsplit(sprintf('-L%s/lib -lcork',CORK));

CGAL_INC=sprintf('-I%s/include',CGAL); CGAL_LIB=strsplit(sprintf('-L%s/lib -lCGAL-vc120-mt-4.8 -lCGAL_Core-vc120-mt-4.8 -llibgmp-10.lib -llibmpfr-4.lib',CGAL)); CGAL_FLAGS='CXXFLAGS=\$CXXFLAGS -frounding-math';

BOOST_INC=sprintf('-I%s',BOOST); BOOST_LIB=strsplit(sprintf('-L%s -lboost_thread-vc120-mt-1_59 -lboost_system-vc120-mt-1_59',BOOST));

mex( ... MEXOPTS{:}, MSSE42, STDCPP11, ... LIBIGL_BASE{:},EIGEN_INC, ... LIBIGL_LIBCGAL, ... CGAL_INC,CGAL_LIB{:},CGAL_FLAGS, ... BOOST_INC,BOOST_LIB{:}, ... 'intersect_other.cpp');

mex( ... MEXOPTS{:}, MSSE42, STDCPP11, ... LIBIGL_BASE{:},EIGEN_INC, ... CGAL_INC,CGAL_LIB{:},CGAL_FLAGS, ... LIBIGL_LIBCGAL, LIBIGL_LIBBOOLEAN, ... CORK_INC,CORK_LIB{:}, ... BOOST_INC,BOOST_LIB{:}, ... 'mesh_boolean.cpp');

Unfortunately there are a lot of compiling errors:

compile_gptoolbox_mex_adjusted Verbose mode is on. ... Looking for compiler 'Microsoft Visual C++ 2013 Professional' ... ... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No. ... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No. ... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 12.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\'). ... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\cl.exe' ...Yes. ... Looking for folder 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC' ...Yes. ... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1' InstallationFolder ...No. ... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1' InstallationFolder ...No. ... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1' InstallationFolder ...Yes ('C:\Program Files (x86)\Windows Kits\8.1\'). ... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No. ... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No. ... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 12.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\'). ... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VC7' 12.0 ...No. ... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VC7' 12.0 ...No. ... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7' 12.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\'). ... Looking for environment variable 'VS120COMNTOOLS' ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\'). ... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe' ...Yes. ... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No. ... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No. ... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 12.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\'). ... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat' ...Yes. ... Looking for folder 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC' ...Yes. Found installed compiler 'Microsoft Visual C++ 2013 Professional'. Set PATH = C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\Bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\Bin\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC..\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC..\Common7\Tools;C:\Program Files (x86)\Windows Kits\8.1\Bin\x64;C:\Program Files (x86)\Windows Kits\8.1\Bin\x86;;C:\Windows;C:\Qt\Qt5.5.1\5.5\msvc2013_64\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\MATLAB\R2015b\runtime\win64;C:\Program Files\MATLAB\R2015b\bin;C:\Program Files\MATLAB\R2015a\runtime\win64;C:\Program Files\MATLAB\R2015a\bin;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\WinBuilds\bin;C:\Program Files\MITK 2015.5.2\bin;C:\Program Files\TortoiseGit\bin;C:\ndigital\programs;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\CMake\bin;C:\dev\boost_1_60_0\lib64-msvc-12.0;C:\dev\CGAL-4.8-beta1\auxiliary\gmp\lib;C:\Program Files\TortoiseHg\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\dev\libQGLViewer-2.6.3\QGLViewer\release;C:\dev\libQGLViewer-2.6.3\QGLViewer\debug;C:\dev\CGAL-4.8-beta1\build\bin Set INCLUDE = C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\ATLMFC\INCLUDE;C:\Program Files (x86)\Windows Kits\8.1\include\shared;C:\Program Files (x86)\Windows Kits\8.1\include\um;C:\Program Files (x86)\Windows Kits\8.1\include\winrt;C:\Program Files\MATLAB\R2015b\extern\include; Set LIB = C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\Lib\amd64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\ATLMFC\Lib\amd64;C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64;C:\Program Files\MATLAB\R2015b\lib\win64; Set LIBPATH = C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\Lib\amd64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\ATLMFC\Lib\amd64;

Options file details

Compiler location: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\..\
Options file: C:\Users\NAME\AppData\Roaming\MathWorks\MATLAB\R2015b\mex_C++_win64.xml
CMDLINE100 : cl /c /Zp8 /GR /W3 /EHs /nologo /MD /O2 /Oy- /DNDEBUG /DMEX  /DIGL_SKIP  /DIGL_SKIP  /DIGL_SKIP  /DIGL_SKIP   /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE -IC:/dev/libigl/include -IC:/dev/eigen/ -IC:/dev/CGAL-4.8-beta1/build/include -IC:/dev/boost_1_59_0/lib64-msvc-12.0  -I"C:\Program Files\MATLAB\R2015b\extern\include" -I"C:\Program Files\MATLAB\R2015b\simulink\include" D:\FFF\Code\#Extern\#Mesh\gptoolbox\mex\intersect_other.cpp /FoC:\Users\NAMEAppData\Local\Temp\mex_1686555835098469_6192\intersect_other.obj
CMDLINE200 : link /nologo /manifest  /DLL  /EXPORT:mexFunction C:\Users\NAME\AppData\Local\Temp\mex_1686555835098469_6192\intersect_other.obj  CGAL-vc120-mt-4.8.lib CGAL_Core-vc120-mt-4.8.lib libgmp-10.lib libmpfr-4.lib libboost_thread-vc120-mt-1_59.lib libboost_system-vc120-mt-1_59.lib  /LIBPATH:C:/dev/CGAL-4.8-beta1/build/lib  /LIBPATH:C:/dev/boost_1_59_0/lib64-msvc-12.0   /LIBPATH:"C:\Program Files\MATLAB\R2015b\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /out:intersect_other.mexw64
CMDLINE250 : mt -outputresource:intersect_other.mexw64;2 -manifest intersect_other.mexw64.manifest
CMDLINE300 : del intersect_other.exp intersect_other.lib intersect_other.mexw64.manifest intersect_other.ilk
COMPILER : cl
COMPFLAGS : /Zp8 /GR /W3 /EHs /nologo /MD
COMPDEFINES : /DMEX  /DIGL_SKIP  /DIGL_SKIP  /DIGL_SKIP  /DIGL_SKIP   /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE
MATLABMEX :  /DMATLAB_MEX_FILE
OPTIMFLAGS : /O2 /Oy- /DNDEBUG
INCLUDE : -IC:/dev/libigl/include -IC:/dev/eigen/ -IC:/dev/CGAL-4.8-beta1/build/include -IC:/dev/boost_1_59_0/lib64-msvc-12.0  -I"C:\Program Files\MATLAB\R2015b\extern\include" -I"C:\Program Files\MATLAB\R2015b\simulink\include"
DEBUGFLAGS : /Z7
LINKER : link
LINKFLAGS : /nologo /manifest
LINKTYPE : /DLL
LINKEXPORT : /EXPORT:mexFunction
LINKLIBS : CGAL-vc120-mt-4.8.lib CGAL_Core-vc120-mt-4.8.lib libgmp-10.lib libmpfr-4.lib libboost_thread-vc120-mt-1_59.lib libboost_system-vc120-mt-1_59.lib  /LIBPATH:C:/dev/CGAL-4.8-beta1/build/lib  /LIBPATH:C:/dev/boost_1_59_0/lib64-msvc-12.0   /LIBPATH:"C:\Program Files\MATLAB\R2015b\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
LINKDEBUGFLAGS : /debug /PDB:"intersect_other.mexw64.pdb"
LINKOPTIMFLAGS :
OBJEXT : .obj
LDEXT : .mexw64
SETENV : set COMPILER=cl
            set COMPFLAGS=/c /Zp8 /GR /W3 /EHs /nologo /MD /DMEX  /DIGL_SKIP  /DIGL_SKIP  /DIGL_SKIP  /DIGL_SKIP   /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE
            set OPTIMFLAGS=/O2 /Oy- /DNDEBUG
            set DEBUGFLAGS=/Z7
            set LINKER=link
            set LINKFLAGS=/nologo /manifest  /export:%ENTRYPOINT% /DLL libCGAL-vc120-mt-4.8.lib CGAL-vc120-mt-4.8.lib  libCGAL_Core-vc120-mt-4.8.lib CGAL_Core-vc120-mt-4.8.lib  liblibgmp-10.lib libgmp-10.lib  liblibmpfr-4.lib libmpfr-4.lib  libboost_thread-vc120-mt-1_59.lib boost_thread-vc120-mt-1_59.lib  libboost_system-vc120-mt-1_59.lib boost_system-vc120-mt-1_59.lib   /LIBPATH:C:/dev/CGAL-4.8-beta1/build/lib  /LIBPATH:C:/dev/boost_1_59_0/lib64-msvc-12.0   /LIBPATH:"C:\Program Files\MATLAB\R2015b\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /EXPORT:mexFunction
            set LINKDEBUGFLAGS=/debug /PDB:"%OUTDIR%%MEX_NAME%.mexw64.pdb"
            set NAME_OUTPUT=/out:"%OUTDIR%%MEX_NAME%%MEX_EXT%"
VCROOT : C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC
SDKROOT : C:\Program Files (x86)\Windows Kits\8.1\
VSINSTALLDIR : C:\Program Files (x86)\Microsoft Visual Studio 12.0\
VCINSTALLDIR : C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\
PROF_ENV : C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe
VCVARSALLDIR : C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC
MATLABROOT : C:\Program Files\MATLAB\R2015b
ARCH : win64
SRC : D:\FFF\Code\#Extern\#Mesh\gptoolbox\mex\intersect_other.cpp
OBJ : C:\Users\NAME\AppData\Local\Temp\mex_1686555835098469_6192\intersect_other.obj
OBJS : C:\Users\NAME\AppData\Local\Temp\mex_1686555835098469_6192\intersect_other.obj
SRCROOT : D:\FFF\Code\#Extern\#Mesh\gptoolbox\mex\intersect_other
DEF : C:\Users\NAME\AppData\Local\Temp\mex_1686555835098469_6192\intersect_other.def
EXP : intersect_other.exp
LIB : intersect_other.lib
EXE : intersect_other.mexw64
ILK : intersect_other.ilk
MANIFEST : intersect_other.mexw64.manifest
TEMPNAME : intersect_other
EXEDIR :
EXENAME : intersect_other
CXXFLAGS : \ -msse4.2 -std=c++11 -frounding-math
OPTIM : /O2 /Oy- /DNDEBUG
LINKOPTIM :

Building with 'Microsoft Visual C++ 2013 Professional'. cl /c /Zp8 /GR /W3 /EHs /nologo /MD /O2 /Oy- /DNDEBUG /DMEX /DIGL_SKIP /DIGL_SKIP /DIGL_SKIP /DIGL_SKIP /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE -IC:/dev/libigl/include -IC:/dev/eigen/ -IC:/dev/CGAL-4.8-beta1/build/include -IC:/dev/boost_1_59_0/lib64-msvc-12.0 -I"C:\Program Files\MATLAB\R2015b\extern\include" -I"C:\Program Files\MATLAB\R2015b\simulink\include" D:\FFF\Code#Extern#Mesh\gptoolbox\mex\intersect_other.cpp /FoC:\Users\NAME\AppData\Local\Temp\mex_1686555835098469_6192\intersect_other.obj Error using mex intersect_other.cpp c:\dev\libigl\include\igl\ply.h(482) : warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245): Siehe Deklaration von 'strdup' c:\dev\libigl\include\igl\ply.h(520) : warning C4267: 'Argument': Konvertierung von 'size_t' nach 'int', Datenverlust m”glich c:\dev\libigl\include\igl\ply.h(957) : warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245): Siehe Deklaration von 'strdup' c:\dev\libigl\include\igl\ply.h(981) : warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245): Siehe Deklaration von 'strdup' c:\dev\libigl\include\igl\ply.h(1070) : warning C4244: '=': Konvertierung von 'double' in 'float', m”glicher Datenverlust c:\dev\libigl\include\igl\ply.h(1106) : warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245): Siehe Deklaration von 'strdup' c:\dev\libigl\include\igl\ply.h(1488) : warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245): Siehe Deklaration von 'strdup' c:\dev\libigl\include\igl\ply.h(1587) : warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245): Siehe Deklaration von 'strdup' c:\dev\libigl\include\igl\ply.h(1644) : warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245): Siehe Deklaration von 'strdup' c:\dev\libigl\include\igl\ply.h(2477) : warning C4244: '=': Konvertierung von 'double' in 'float', m”glicher Datenverlust c:\dev\libigl\include\igl\ply.h(2891) : warning C4244: '=': Konvertierung von 'double' in 'float', m”glicher Datenverlust c:\dev\libigl\include\igl\ply.h(2919) : warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245): Siehe Deklaration von 'strdup' c:\dev\libigl\include\igl\ply.h(2984) : warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245): Siehe Deklaration von 'strdup' c:\dev\libigl\include\igl\ply.h(2989) : warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245): Siehe Deklaration von 'strdup' c:\dev\libigl\include\igl\ply.h(3056) : warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245): Siehe Deklaration von 'strdup' C:/dev/libigl/include\igl/matlab/prepare_lhs.h(40) : error C2039: 'SparseMatrix': Ist kein Element von 'Eigen' C:/dev/libigl/include\igl/matlab/prepare_lhs.h(40) : error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: "default-int" wird von C++ nicht unterst�tzt. C:/dev/libigl/include\igl/matlab/prepare_lhs.h(40) : error C2143: Syntaxfehler: Es fehlt ',' vor '<' c:\dev\libigl\include\igl\matlab\prepare_lhs.cpp(62) : error C2039: 'SparseMatrix': Ist kein Element von 'Eigen' c:\dev\libigl\include\igl\matlab\prepare_lhs.cpp(62) : error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: "default-int" wird von C++ nicht unterst�tzt. c:\dev\libigl\include\igl\matlab\prepare_lhs.cpp(62) : warning C4346: 'igl::matlab::prepare_lhs_double': Abh„ngiger Name ist kein Typ Pr„fix mit 'typename' zum Angeben eines Typs c:\dev\libigl\include\igl\matlab\prepare_lhs.cpp(62) : error C2143: Syntaxfehler: Es fehlt ',' vor '<' c:\dev\libigl\include\igl\copyleft\cgal\CGAL_includes.hpp(17) : fatal error C1083: Datei (Include) kann nicht ge”ffnet werden: "CGAL/intersections.h": No such file or directory

Error in compile_gptoolbox_mex_adjusted (line 78) mex( ...

I replaced "strdup" with "_strdup" in "c:\dev\libigl\include\igl\ply.h"

But my C++ skills are very limited, would be great if you could help to fix the other errors:

Error using mex intersect_other.cpp c:\dev\libigl\include\igl\ply.h(520) : warning C4267: 'Argument': Konvertierung von 'size_t' nach 'int', Datenverlust m”glich c:\dev\libigl\include\igl\ply.h(1070) : warning C4244: '=': Konvertierung von 'double' in 'float', m”glicher Datenverlust c:\dev\libigl\include\igl\ply.h(2477) : warning C4244: '=': Konvertierung von 'double' in 'float', m”glicher Datenverlust c:\dev\libigl\include\igl\ply.h(2891) : warning C4244: '=': Konvertierung von 'double' in 'float', m”glicher Datenverlust C:/dev/libigl/include\igl/matlab/prepare_lhs.h(40) : error C2039: 'SparseMatrix': Ist kein Element von 'Eigen' C:/dev/libigl/include\igl/matlab/prepare_lhs.h(40) : error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: "default-int" wird von C++ nicht unterst�tzt. C:/dev/libigl/include\igl/matlab/prepare_lhs.h(40) : error C2143: Syntaxfehler: Es fehlt ',' vor '<' c:\dev\libigl\include\igl\matlab\prepare_lhs.cpp(62) : error C2039: 'SparseMatrix': Ist kein Element von 'Eigen' c:\dev\libigl\include\igl\matlab\prepare_lhs.cpp(62) : error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: "default-int" wird von C++ nicht unterst�tzt. c:\dev\libigl\include\igl\matlab\prepare_lhs.cpp(62) : warning C4346: 'igl::matlab::prepare_lhs_double': Abh„ngiger Name ist kein Typ Pr„fix mit 'typename' zum Angeben eines Typs c:\dev\libigl\include\igl\matlab\prepare_lhs.cpp(62) : error C2143: Syntaxfehler: Es fehlt ',' vor '<' c:\dev\libigl\include\igl\copyleft\cgal\CGAL_includes.hpp(17) : fatal error C1083: Datei (Include) kann nicht ge”ffnet werden: "CGAL/intersections.h": No such file or directory

Error in compile_gptoolbox_mex_adjusted (line 78) mex( ...

  • "SparseMatrix.h" is located in "C:\dev\eigen\Eigen\src\SparseCore"
  • The "CGAL/intersections.h" is located in "C:\dev\CGAL-4.8-beta1\include\CGAL"

Thanks in advance

— Reply to this email directly or view it on GitHub https://github.com/alecjacobson/gptoolbox/issues/10#issuecomment-194205850 .

oqilipo commented 8 years ago

You've been right, thank you.

Unfortunately I get some new errors:

Error using mex
intersect_other.cpp
c:\dev\libigl\include\igl\ply.h(520) : warning C4267: 'Argument': Konvertierung von 'size_t' nach 'int',
Datenverlust m”glich
c:\dev\libigl\include\igl\ply.h(1070) : warning C4244: '=': Konvertierung von 'double' in 'float', m”glicher
Datenverlust
c:\dev\libigl\include\igl\ply.h(2477) : warning C4244: '=': Konvertierung von 'double' in 'float', m”glicher
Datenverlust
c:\dev\libigl\include\igl\ply.h(2891) : warning C4244: '=': Konvertierung von 'double' in 'float', m”glicher
Datenverlust
C:/dev/boost_1_59_0\boost/config/abi_prefix.hpp(19) : warning C4103:
"c:\dev\boost_1_59_0\boost\config\abi_prefix.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert,
m”glicherweise fehlt "#pragma pack(pop)".
C:/dev/boost_1_59_0\boost/system/error_code.hpp(31) : warning C4103:
"c:\dev\boost_1_59_0\boost\system\error_code.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert,
m”glicherweise fehlt "#pragma pack(pop)".
C:/dev/boost_1_59_0\boost/config/abi_suffix.hpp(20) : warning C4103:
"c:\dev\boost_1_59_0\boost\config\abi_suffix.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert,
m”glicherweise fehlt "#pragma pack(pop)".
C:/dev/boost_1_59_0\boost/system/error_code.hpp(512) : warning C4103:
"c:\dev\boost_1_59_0\boost\system\error_code.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert,
m”glicherweise fehlt "#pragma pack(pop)".
C:/dev/boost_1_59_0\boost/thread/exceptions.hpp(26) : warning C4103:
"c:\dev\boost_1_59_0\boost\thread\exceptions.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert,
m”glicherweise fehlt "#pragma pack(pop)".
C:/dev/boost_1_59_0\boost/thread/exceptions.hpp(223) : warning C4103:
"c:\dev\boost_1_59_0\boost\thread\exceptions.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert,
m”glicherweise fehlt "#pragma pack(pop)".
C:/dev/boost_1_59_0\boost/thread/win32/thread_primitives.hpp(221) : warning C4103:
"c:\dev\boost_1_59_0\boost\thread\win32\thread_primitives.hpp": Ausrichtung wurde nach Einschlieáen des Headers
ge„ndert, m”glicherweise fehlt "#pragma pack(pop)".
C:/dev/boost_1_59_0\boost/thread/win32/thread_primitives.hpp(667) : warning C4103:
"c:\dev\boost_1_59_0\boost\thread\win32\thread_primitives.hpp": Ausrichtung wurde nach Einschlieáen des Headers
ge„ndert, m”glicherweise fehlt "#pragma pack(pop)".
C:/dev/boost_1_59_0\boost/thread/win32/thread_heap_alloc.hpp(55) : warning C4103:
"c:\dev\boost_1_59_0\boost\thread\win32\thread_heap_alloc.hpp": Ausrichtung wurde nach Einschlieáen des Headers
ge„ndert, m”glicherweise fehlt "#pragma pack(pop)".
C:/dev/boost_1_59_0\boost/thread/win32/thread_heap_alloc.hpp(406) : warning C4103:
"c:\dev\boost_1_59_0\boost\thread\win32\thread_heap_alloc.hpp": Ausrichtung wurde nach Einschlieáen des Headers
ge„ndert, m”glicherweise fehlt "#pragma pack(pop)".
C:/dev/boost_1_59_0\boost/thread/tss.hpp(12) : warning C4103: "c:\dev\boost_1_59_0\boost\thread\tss.hpp":
Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)".
C:/dev/boost_1_59_0\boost/thread/tss.hpp(111) : warning C4103: "c:\dev\boost_1_59_0\boost\thread\tss.hpp":
Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)".
C:/dev/CGAL-4.8-beta1/include\CGAL/gmp.h(30) : fatal error C1083: Datei (Include) kann nicht ge”ffnet werden:
"gmp.h": No such file or directory

Error in compile_gptoolbox_mex_adjusted (line 66)
mex( ...

There are three files with the name gmp.h

Code of "compile_gptoolbox_mex_adjusted.m" looks like:

path_to_boost='C:/dev/boost_1_59_0';
path_to_cgal='C:/dev/CGAL-4.8-beta1';
cgal_version='-vc120-mt-4.8';
path_to_eigen='C:/dev/eigen';
path_to_eltopo='C:/dev/eltopo';
path_to_libigl='C:/dev/libigl';

MEXOPTS={'-v','-largeArrayDims','-DMEX'};
MSSE42='CXXFLAGS=$CXXFLAGS -msse4.2';
STDCPP11='CXXFLAGS=$CXXFLAGS -std=c++11';

BOOST_INC=sprintf('-I%s',path_to_boost);
BOOST_LIB=strsplit(sprintf('-L%s/lib64-msvc-12.0 -lboost_thread-vc120-mt-1_59 -lboost_system-vc120-mt-1_59',path_to_boost));

CGAL_INC=sprintf('-I%s/include',path_to_cgal);
CGAL_LIB=strsplit(sprintf('-L%s/build/lib -lCGAL%s -lCGAL_Core%s -llibgmp-10.lib -llibmpfr-4.lib',path_to_cgal,cgal_version,cgal_version));
CGAL_FLAGS='CXXFLAGS=\$CXXFLAGS -frounding-math';

EIGEN_INC=sprintf('-I%s/',path_to_eigen);

ELTOPO_INC= sprintf('-I%s/',path_to_eltopo);
ELTOPO_LIB= strsplit(sprintf('-L%s/eltopo3d -leltopo_release',path_to_eltopo));
CLANG={'CXX=/usr/bin/clang++','LD=/usr/bin/clang++'};
FRAMEWORK_LDFLAGS='LDFLAGS=\$LDFLAGS -framework Foundation -framework AppKit -framework Accelerate';
NOOPT_LDOPTIMFLAGS='LDOPTIMFLAGS="-O "';

% See libigl documentation. In short, Libigl is a header-only library by
% default: no compilation needed (like Eigen). There's an advanced **option**
% to precompile libigl as a static library. This cuts down on compilation time.
% It is optional and more difficult to set up. Set this to true only if you
% know what you're doing.
use_libigl_static_library = false;
LIBIGL_INC=sprintf('-I%s/include',path_to_libigl);
if use_libigl_static_library
  LIBIGL_FLAGS='-DIGL_STATIC_LIBRARY';
  LIBIGL_LIB=sprintf('-L%s/lib -ligl',path_to_libigl);
  LIBIGL_LIBEMBREE='-liglembree';
  LIBIGL_LIBMATLAB='-liglmatlab';
  LIBIGL_LIBCGAL='-liglcgal';
  LIBIGL_LIBBOOLEAN='-liglboolean';
  LIBIGL_LIBSVD3X3='-liglsvd3x3';
else
  % `mex` has a silly requirement that arguments be non-empty, hence the NOOP
  % defines
  LIBIGL_FLAGS='-DIGL_SKIP';
  LIBIGL_LIB='-DIGL_SKIP';
  LIBIGL_LIBMATLAB='-DIGL_SKIP';
  LIBIGL_LIBEMBREE='-DIGL_SKIP';
  LIBIGL_LIBCGAL='-DIGL_SKIP';
  LIBIGL_LIBBOOLEAN='-DIGL_SKIP';
  LIBIGL_LIBSVD3X3='-DIGL_SKIP';
end
LIBIGL_BASE={LIBIGL_INC,LIBIGL_FLAGS,LIBIGL_LIB,LIBIGL_LIBMATLAB};

SVD_INC=sprintf('-I%s/external/Singular_Value_Decomposition/',path_to_libigl);

EMBREE=[path_to_libigl '/external/embree'];
EMBREE_INC=strsplit(sprintf('-I%s -I%s/include/',EMBREE,EMBREE));
EMBREE_LIB=strsplit(sprintf('-L%s/build -lembree -lsys',EMBREE));

CORK=[path_to_libigl '/external/cork'];
CORK_INC=sprintf('-I%s/include',CORK);
CORK_LIB=strsplit(sprintf('-L%s/lib -lcork',CORK));

%%
mex( ...
  MEXOPTS{:}, MSSE42, STDCPP11, LIBIGL_BASE{:},EIGEN_INC, LIBIGL_LIBCGAL, ...
  CGAL_INC,CGAL_LIB{:},CGAL_FLAGS, BOOST_INC,BOOST_LIB{:}, ...
  'intersect_other.cpp');

mex( ...
  MEXOPTS{:}, MSSE42, STDCPP11, LIBIGL_BASE{:},EIGEN_INC, ...
  CGAL_INC,CGAL_LIB{:},CGAL_FLAGS, LIBIGL_LIBCGAL, LIBIGL_LIBBOOLEAN, ...
  CORK_INC,CORK_LIB{:}, BOOST_INC,BOOST_LIB{:}, ...
  'mesh_boolean.cpp');

Thanks in advance

alecjacobson commented 8 years ago

Now it's looking like it can't find gmp. Typically this is installed to get CGAL to work. You might have more success first trying to install CGAL or perhaps libigl+CGAL and then finding where things are being installed on your machine.

On Thu, Mar 10, 2016 at 8:58 AM, oqilipo notifications@github.com wrote:

You've been right, thank you.

Unfortunately I get some new errors:

Error using mex intersect_other.cpp c:\dev\libigl\include\igl\ply.h(520) : warning C4267: 'Argument': Konvertierung von 'size_t' nach 'int', Datenverlust m”glich c:\dev\libigl\include\igl\ply.h(1070) : warning C4244: '=': Konvertierung von 'double' in 'float', m”glicher Datenverlust c:\dev\libigl\include\igl\ply.h(2477) : warning C4244: '=': Konvertierung von 'double' in 'float', m”glicher Datenverlust c:\dev\libigl\include\igl\ply.h(2891) : warning C4244: '=': Konvertierung von 'double' in 'float', m”glicher Datenverlust C:/dev/boost_1_59_0\boost/config/abi_prefix.hpp(19) : warning C4103: "c:\dev\boost_1_59_0\boost\config\abi_prefix.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". C:/dev/boost_1_59_0\boost/system/error_code.hpp(31) : warning C4103: "c:\dev\boost_1_59_0\boost\system\error_code.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". C:/dev/boost_1_59_0\boost/config/abi_suffix.hpp(20) : warning C4103: "c:\dev\boost_1_59_0\boost\config\abi_suffix.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". C:/dev/boost_1_59_0\boost/system/error_code.hpp(512) : warning C4103: "c:\dev\boost_1_59_0\boost\system\error_code.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". C:/dev/boost_1_59_0\boost/thread/exceptions.hpp(26) : warning C4103: "c:\dev\boost_1_59_0\boost\thread\exceptions.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". C:/dev/boost_1_59_0\boost/thread/exceptions.hpp(223) : warning C4103: "c:\dev\boost_1_59_0\boost\thread\exceptions.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". C:/dev/boost_1_59_0\boost/thread/win32/thread_primitives.hpp(221) : warning C4103: "c:\dev\boost_1_59_0\boost\thread\win32\thread_primitives.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". C:/dev/boost_1_59_0\boost/thread/win32/thread_primitives.hpp(667) : warning C4103: "c:\dev\boost_1_59_0\boost\thread\win32\thread_primitives.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". C:/dev/boost_1_59_0\boost/thread/win32/thread_heap_alloc.hpp(55) : warning C4103: "c:\dev\boost_1_59_0\boost\thread\win32\thread_heap_alloc.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". C:/dev/boost_1_59_0\boost/thread/win32/thread_heap_alloc.hpp(406) : warning C4103: "c:\dev\boost_1_59_0\boost\thread\win32\thread_heap_alloc.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". C:/dev/boost_1_59_0\boost/thread/tss.hpp(12) : warning C4103: "c:\dev\boost_1_59_0\boost\thread\tss.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". C:/dev/boost_1_59_0\boost/thread/tss.hpp(111) : warning C4103: "c:\dev\boost_1_59_0\boost\thread\tss.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". C:/dev/CGAL-4.8-beta1/include\CGAL/gmp.h(30) : fatal error C1083: Datei (Include) kann nicht ge”ffnet werden: "gmp.h": No such file or directory

Error in compile_gptoolbox_mex_adjusted (line 66) mex( ...

There are three files with the name gmp.h

  • C:\dev\CGAL-4.8-beta1\include\CGAL\gmp.h
  • C:\dev\CGAL-4.8-beta1\auxiliary\gmp\include\gmp.h
  • C:\dev\CGAL-4.8-beta1\include\CGAL\CORE\Gmp.h

Code of "compile_gptoolbox_mex_adjusted.m" looks like:

path_to_boost='C:/dev/boost_1_59_0'; path_to_cgal='C:/dev/CGAL-4.8-beta1'; cgal_version='-vc120-mt-4.8'; path_to_eigen='C:/dev/eigen'; path_to_eltopo='C:/dev/eltopo'; path_to_libigl='C:/dev/libigl';

MEXOPTS={'-v','-largeArrayDims','-DMEX'}; MSSE42='CXXFLAGS=$CXXFLAGS -msse4.2'; STDCPP11='CXXFLAGS=$CXXFLAGS -std=c++11';

BOOST_INC=sprintf('-I%s',path_to_boost); BOOST_LIB=strsplit(sprintf('-L%s/lib64-msvc-12.0 -lboost_thread-vc120-mt-1_59 -lboost_system-vc120-mt-1_59',path_to_boost));

CGAL_INC=sprintf('-I%s/include',path_to_cgal); CGAL_LIB=strsplit(sprintf('-L%s/build/lib -lCGAL%s -lCGAL_Core%s -llibgmp-10.lib -llibmpfr-4.lib',path_to_cgal,cgal_version,cgal_version)); CGAL_FLAGS='CXXFLAGS=\$CXXFLAGS -frounding-math';

EIGEN_INC=sprintf('-I%s/',path_to_eigen);

ELTOPO_INC= sprintf('-I%s/',path_to_eltopo); ELTOPO_LIB= strsplit(sprintf('-L%s/eltopo3d -leltopo_release',path_to_eltopo)); CLANG={'CXX=/usr/bin/clang++','LD=/usr/bin/clang++'}; FRAMEWORK_LDFLAGS='LDFLAGS=\$LDFLAGS -framework Foundation -framework AppKit -framework Accelerate'; NOOPT_LDOPTIMFLAGS='LDOPTIMFLAGS="-O "';

% See libigl documentation. In short, Libigl is a header-only library by % default: no compilation needed (like Eigen). There's an advanced option % to precompile libigl as a static library. This cuts down on compilation time. % It is optional and more difficult to set up. Set this to true only if you % know what you're doing. use_libigl_static_library = false; LIBIGL_INC=sprintf('-I%s/include',path_to_libigl); if use_libigl_static_library LIBIGL_FLAGS='-DIGL_STATIC_LIBRARY'; LIBIGL_LIB=sprintf('-L%s/lib -ligl',path_to_libigl); LIBIGL_LIBEMBREE='-liglembree'; LIBIGL_LIBMATLAB='-liglmatlab'; LIBIGL_LIBCGAL='-liglcgal'; LIBIGL_LIBBOOLEAN='-liglboolean'; LIBIGL_LIBSVD3X3='-liglsvd3x3'; else % mex has a silly requirement that arguments be non-empty, hence the NOOP % defines LIBIGL_FLAGS='-DIGL_SKIP'; LIBIGL_LIB='-DIGL_SKIP'; LIBIGL_LIBMATLAB='-DIGL_SKIP'; LIBIGL_LIBEMBREE='-DIGL_SKIP'; LIBIGL_LIBCGAL='-DIGL_SKIP'; LIBIGL_LIBBOOLEAN='-DIGL_SKIP'; LIBIGL_LIBSVD3X3='-DIGL_SKIP'; end LIBIGL_BASE={LIBIGL_INC,LIBIGL_FLAGS,LIBIGL_LIB,LIBIGL_LIBMATLAB};

SVD_INC=sprintf('-I%s/external/Singular_Value_Decomposition/',path_to_libigl);

EMBREE=[path_to_libigl '/external/embree']; EMBREE_INC=strsplit(sprintf('-I%s -I%s/include/',EMBREE,EMBREE)); EMBREE_LIB=strsplit(sprintf('-L%s/build -lembree -lsys',EMBREE));

CORK=[path_to_libigl '/external/cork']; CORK_INC=sprintf('-I%s/include',CORK); CORK_LIB=strsplit(sprintf('-L%s/lib -lcork',CORK));

%% mex( ... MEXOPTS{:}, MSSE42, STDCPP11, LIBIGL_BASE{:},EIGEN_INC, LIBIGL_LIBCGAL, ... CGAL_INC,CGAL_LIB{:},CGAL_FLAGS, BOOST_INC,BOOST_LIB{:}, ... 'intersect_other.cpp');

mex( ... MEXOPTS{:}, MSSE42, STDCPP11, LIBIGL_BASE{:},EIGEN_INC, ... CGAL_INC,CGAL_LIB{:},CGAL_FLAGS, LIBIGL_LIBCGAL, LIBIGL_LIBBOOLEAN, ... CORK_INC,CORK_LIB{:}, BOOST_INC,BOOST_LIB{:}, ... 'mesh_boolean.cpp');

Thanks in advance

— Reply to this email directly or view it on GitHub https://github.com/alecjacobson/gptoolbox/issues/10#issuecomment-194854405 .

oqilipo commented 8 years ago

Hi

As I mentioned above, I already installed CGAL and the "Triangulation_3 demo" works fine.

Now I've added

path_to_boost='C:/dev/boost';
path_to_cgal='C:/dev/CGAL-4.8-beta1';
cgal_version='-vc120-mt-4.8';
path_to_eigen='C:/dev/eigen';
path_to_eltopo='C:/dev/eltopo';
path_to_libigl='C:/dev/libigl';
path_to_gmp = 'C:\dev\CGAL-4.8-beta1\auxiliary\gmp\include';

MEXOPTS={'-v','-largeArrayDims','-DMEX'};
MSSE42='CXXFLAGS=$CXXFLAGS -msse4.2';
STDCPP11='CXXFLAGS=$CXXFLAGS -std=c++11';

BOOST_INC=sprintf('-I%s',path_to_boost);
BOOST_LIB=strsplit(sprintf('-L%s/lib64-msvc-12.0 -lboost_thread-vc120-mt-1_58 -lboost_system-vc120-mt-1_58',path_to_boost));

CGAL_INC=sprintf('-I%s/include',path_to_cgal);
CGAL_LIB=strsplit(sprintf('-L%s/build/lib -lCGAL%s -lCGAL_Core%s -llibgmp-10.lib -llibmpfr-4.lib',path_to_cgal,cgal_version,cgal_version));
CGAL_FLAGS='CXXFLAGS=\$CXXFLAGS -frounding-math';

EIGEN_INC=sprintf('-I%s/',path_to_eigen);
GMP_INC=sprintf('-I%s',path_to_gmp);

ELTOPO_INC= sprintf('-I%s/',path_to_eltopo);
ELTOPO_LIB= strsplit(sprintf('-L%s/eltopo3d -leltopo_release',path_to_eltopo));
CLANG={'CXX=/usr/bin/clang++','LD=/usr/bin/clang++'};
FRAMEWORK_LDFLAGS='LDFLAGS=\$LDFLAGS -framework Foundation -framework AppKit -framework Accelerate';
NOOPT_LDOPTIMFLAGS='LDOPTIMFLAGS="-O "';

% See libigl documentation. In short, Libigl is a header-only library by
% default: no compilation needed (like Eigen). There's an advanced **option**
% to precompile libigl as a static library. This cuts down on compilation time.
% It is optional and more difficult to set up. Set this to true only if you
% know what you're doing.
use_libigl_static_library = false;
LIBIGL_INC=sprintf('-I%s/include',path_to_libigl);
if use_libigl_static_library
  LIBIGL_FLAGS='-DIGL_STATIC_LIBRARY';
  LIBIGL_LIB=sprintf('-L%s/lib -ligl',path_to_libigl);
  LIBIGL_LIBEMBREE='-liglembree';
  LIBIGL_LIBMATLAB='-liglmatlab';
  LIBIGL_LIBCGAL='-liglcgal';
  LIBIGL_LIBBOOLEAN='-liglboolean';
  LIBIGL_LIBSVD3X3='-liglsvd3x3';
else
  % `mex` has a silly requirement that arguments be non-empty, hence the NOOP
  % defines
  LIBIGL_FLAGS='-DIGL_SKIP';
  LIBIGL_LIB='-DIGL_SKIP';
  LIBIGL_LIBMATLAB='-DIGL_SKIP';
  LIBIGL_LIBEMBREE='-DIGL_SKIP';
  LIBIGL_LIBCGAL='-DIGL_SKIP';
  LIBIGL_LIBBOOLEAN='-DIGL_SKIP';
  LIBIGL_LIBSVD3X3='-DIGL_SKIP';
end
LIBIGL_BASE={LIBIGL_INC,LIBIGL_FLAGS,LIBIGL_LIB,LIBIGL_LIBMATLAB};

SVD_INC=sprintf('-I%s/external/Singular_Value_Decomposition/',path_to_libigl);

EMBREE=[path_to_libigl '/external/embree'];
EMBREE_INC=strsplit(sprintf('-I%s -I%s/include/',EMBREE,EMBREE));
EMBREE_LIB=strsplit(sprintf('-L%s/build -lembree -lsys',EMBREE));

CORK=[path_to_libigl '/external/cork'];
CORK_INC=sprintf('-I%s/include',CORK);
CORK_LIB=strsplit(sprintf('-L%s/lib -lcork',CORK));

%%
mex( ...
  MEXOPTS{:}, MSSE42, STDCPP11, LIBIGL_BASE{:},EIGEN_INC, LIBIGL_LIBCGAL, ...
  CGAL_INC,CGAL_LIB{:},CGAL_FLAGS, BOOST_INC,BOOST_LIB{:}, GMP_INC,...
  'intersect_other.cpp');

mex( ...
  MEXOPTS{:}, MSSE42, STDCPP11, LIBIGL_BASE{:},EIGEN_INC, ...
  CGAL_INC,CGAL_LIB{:},CGAL_FLAGS, LIBIGL_LIBCGAL, LIBIGL_LIBBOOLEAN, ...
  CORK_INC,CORK_LIB{:}, BOOST_INC,BOOST_LIB{:}, ...
  'mesh_boolean.cpp');

Unfortunately there are some new errors

compile_gptoolbox_mex_adjusted
Verbose mode is on.
... Looking for compiler 'Microsoft Visual C++ 2013 Professional' ...
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 12.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\').
... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\cl.exe' ...Yes.
... Looking for folder 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC' ...Yes.
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1' InstallationFolder ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1' InstallationFolder ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1' InstallationFolder ...Yes ('C:\Program Files (x86)\Windows Kits\8.1\').
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 12.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\').
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VC7' 12.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VC7' 12.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7' 12.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\').
... Looking for environment variable 'VS120COMNTOOLS' ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\').
... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe' ...Yes.
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 12.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 12.0\').
... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat' ...Yes.
... Looking for folder 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC' ...Yes.
Found installed compiler 'Microsoft Visual C++ 2013 Professional'.
Set PATH = C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\Bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\Bin\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\..\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\..\Common7\Tools;C:\Program Files (x86)\Windows Kits\8.1\\Bin\x64;C:\Program Files (x86)\Windows Kits\8.1\\Bin\x86;;C:\Windows;C:\Windows\system32;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\MATLAB\R2015b\runtime\win64;C:\Program Files\MATLAB\R2015b\bin;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\WinBuilds\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\TortoiseSVN\bin;C:\Program Files\TortoiseHg\;C:\Program Files (x86)\CMake\bin;C:\dev\boost_1_59_0\lib64-msvc-12.0;C:\Qt\Qt5.5.1\5.5\msvc2013_64\bin;C:\dev\CGAL-4.8-beta1\auxiliary\gmp\lib;C:\dev\CGAL-4.8-beta1\build\bin;C:\dev\libQGLViewer-2.6.3\QGLViewer\release;C:\dev\libQGLViewer-2.6.3\QGLViewer\debug;C:\dev\tbb44_20160128oss\lib\intel64\vc12;C:\Program Files\TortoiseGit\bin;C:\Users\User\AppData\Local\Temp;
Set INCLUDE = C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\ATLMFC\INCLUDE;C:\Program Files (x86)\Windows Kits\8.1\\include\shared;C:\Program Files (x86)\Windows Kits\8.1\\include\um;C:\Program Files (x86)\Windows Kits\8.1\\include\winrt;C:\Program Files\MATLAB\R2015b\extern\include;
Set LIB = C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\Lib\amd64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\ATLMFC\Lib\amd64;C:\Program Files (x86)\Windows Kits\8.1\\lib\winv6.3\um\x64;C:\Program Files\MATLAB\R2015b\lib\win64;
Set LIBPATH = C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\Lib\amd64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\ATLMFC\Lib\amd64;
Options file details
-------------------------------------------------------------------
    Compiler location: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\..\
    Options file: C:\Users\User\AppData\Roaming\MathWorks\MATLAB\R2015b\mex_C++_win64.xml
    CMDLINE100 : cl /c /Zp8 /GR /W3 /EHs /nologo /MD /O2 /Oy- /DNDEBUG /DMEX  /DIGL_SKIP  /DIGL_SKIP  /DIGL_SKIP  /DIGL_SKIP   /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE -IC:/dev/libigl/include -IC:/dev/eigen/ -IC:/dev/CGAL-4.8-beta1/include -IC:/dev/boost -IC:\dev\CGAL-4.8-beta1\auxiliary\gmp\include  -I"C:\Program Files\MATLAB\R2015b\extern\include" -I"C:\Program Files\MATLAB\R2015b\simulink\include" D:\FFF\Code\#Extern\#Mesh\gptoolbox\mex\intersect_other.cpp /FoC:\Users\User\AppData\Local\Temp\mex_1419544536080718_1180\intersect_other.obj
    CMDLINE200 : link /nologo /manifest  /DLL  /EXPORT:mexFunction C:\Users\User\AppData\Local\Temp\mex_1419544536080718_1180\intersect_other.obj  CGAL-vc120-mt-4.8.lib CGAL_Core-vc120-mt-4.8.lib libgmp-10.lib libmpfr-4.lib libboost_thread-vc120-mt-1_58.lib libboost_system-vc120-mt-1_58.lib  /LIBPATH:C:/dev/CGAL-4.8-beta1/build/lib  /LIBPATH:C:/dev/boost/lib64-msvc-12.0   /LIBPATH:"C:\Program Files\MATLAB\R2015b\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /out:intersect_other.mexw64
    CMDLINE250 : mt -outputresource:intersect_other.mexw64;2 -manifest intersect_other.mexw64.manifest
    CMDLINE300 : del intersect_other.exp intersect_other.lib intersect_other.mexw64.manifest intersect_other.ilk
    COMPILER : cl
    COMPFLAGS : /Zp8 /GR /W3 /EHs /nologo /MD
    COMPDEFINES : /DMEX  /DIGL_SKIP  /DIGL_SKIP  /DIGL_SKIP  /DIGL_SKIP   /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE
    MATLABMEX :  /DMATLAB_MEX_FILE
    OPTIMFLAGS : /O2 /Oy- /DNDEBUG
    INCLUDE : -IC:/dev/libigl/include -IC:/dev/eigen/ -IC:/dev/CGAL-4.8-beta1/include -IC:/dev/boost -IC:\dev\CGAL-4.8-beta1\auxiliary\gmp\include  -I"C:\Program Files\MATLAB\R2015b\extern\include" -I"C:\Program Files\MATLAB\R2015b\simulink\include"
    DEBUGFLAGS : /Z7
    LINKER : link
    LINKFLAGS : /nologo /manifest 
    LINKTYPE : /DLL
    LINKEXPORT : /EXPORT:mexFunction
    LINKLIBS : CGAL-vc120-mt-4.8.lib CGAL_Core-vc120-mt-4.8.lib libgmp-10.lib libmpfr-4.lib libboost_thread-vc120-mt-1_58.lib libboost_system-vc120-mt-1_58.lib  /LIBPATH:C:/dev/CGAL-4.8-beta1/build/lib  /LIBPATH:C:/dev/boost/lib64-msvc-12.0   /LIBPATH:"C:\Program Files\MATLAB\R2015b\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
    LINKDEBUGFLAGS : /debug /PDB:"intersect_other.mexw64.pdb"
    LINKOPTIMFLAGS : 
    OBJEXT : .obj
    LDEXT : .mexw64
    SETENV : set COMPILER=cl 
                set COMPFLAGS=/c /Zp8 /GR /W3 /EHs /nologo /MD /DMEX  /DIGL_SKIP  /DIGL_SKIP  /DIGL_SKIP  /DIGL_SKIP   /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE  /DMATLAB_MEX_FILE 
                set OPTIMFLAGS=/O2 /Oy- /DNDEBUG 
                set DEBUGFLAGS=/Z7 
                set LINKER=link 
                set LINKFLAGS=/nologo /manifest  /export:%ENTRYPOINT% /DLL libCGAL-vc120-mt-4.8.lib CGAL-vc120-mt-4.8.lib  libCGAL_Core-vc120-mt-4.8.lib CGAL_Core-vc120-mt-4.8.lib  liblibgmp-10.lib libgmp-10.lib  liblibmpfr-4.lib libmpfr-4.lib  libboost_thread-vc120-mt-1_58.lib boost_thread-vc120-mt-1_58.lib  libboost_system-vc120-mt-1_58.lib boost_system-vc120-mt-1_58.lib   /LIBPATH:C:/dev/CGAL-4.8-beta1/build/lib  /LIBPATH:C:/dev/boost/lib64-msvc-12.0   /LIBPATH:"C:\Program Files\MATLAB\R2015b\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /EXPORT:mexFunction 
                set LINKDEBUGFLAGS=/debug /PDB:"%OUTDIR%%MEX_NAME%.mexw64.pdb" 
                set NAME_OUTPUT=/out:"%OUTDIR%%MEX_NAME%%MEX_EXT%"
    VCROOT : C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC
    SDKROOT : C:\Program Files (x86)\Windows Kits\8.1\
    VSINSTALLDIR : C:\Program Files (x86)\Microsoft Visual Studio 12.0\
    VCINSTALLDIR : C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\
    PROF_ENV : C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe
    VCVARSALLDIR : C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC
    MATLABROOT : C:\Program Files\MATLAB\R2015b
    ARCH : win64
    SRC : D:\FFF\Code\#Extern\#Mesh\gptoolbox\mex\intersect_other.cpp
    OBJ : C:\Users\User\AppData\Local\Temp\mex_1419544536080718_1180\intersect_other.obj
    OBJS : C:\Users\User\AppData\Local\Temp\mex_1419544536080718_1180\intersect_other.obj 
    SRCROOT : D:\FFF\Code\#Extern\#Mesh\gptoolbox\mex\intersect_other
    DEF : C:\Users\User\AppData\Local\Temp\mex_1419544536080718_1180\intersect_other.def
    EXP : intersect_other.exp
    LIB : intersect_other.lib
    EXE : intersect_other.mexw64
    ILK : intersect_other.ilk
    MANIFEST : intersect_other.mexw64.manifest
    TEMPNAME : intersect_other
    EXEDIR : 
    EXENAME : intersect_other
    CXXFLAGS : \ -msse4.2 -std=c++11 -frounding-math
    OPTIM : /O2 /Oy- /DNDEBUG
    LINKOPTIM : 
-------------------------------------------------------------------
Building with 'Microsoft Visual C++ 2013 Professional'.
cl /c /Zp8 /GR /W3 /EHs /nologo /MD /O2 /Oy- /DNDEBUG /DMEX  /DIGL_SKIP  /DIGL_SKIP  /DIGL_SKIP  /DIGL_SKIP   /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0   /DMATLAB_MEX_FILE -IC:/dev/libigl/include -IC:/dev/eigen/ -IC:/dev/CGAL-4.8-beta1/include -IC:/dev/boost -IC:\dev\CGAL-4.8-beta1\auxiliary\gmp\include  -I"C:\Program Files\MATLAB\R2015b\extern\include" -I"C:\Program Files\MATLAB\R2015b\simulink\include" D:\FFF\Code\#Extern\#Mesh\gptoolbox\mex\intersect_other.cpp /FoC:\Users\User\AppData\Local\Temp\mex_1419544536080718_1180\intersect_other.obj
Error using mex
intersect_other.cpp
c:\dev\libigl\include\igl\ply.h(482) : warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead,
use the ISO C++ conformant name: _strdup. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245) : see declaration of 'strdup'
c:\dev\libigl\include\igl\ply.h(520) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss
of data
c:\dev\libigl\include\igl\ply.h(957) : warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead,
use the ISO C++ conformant name: _strdup. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245) : see declaration of 'strdup'
c:\dev\libigl\include\igl\ply.h(981) : warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead,
use the ISO C++ conformant name: _strdup. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245) : see declaration of 'strdup'
c:\dev\libigl\include\igl\ply.h(1070) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of
data
c:\dev\libigl\include\igl\ply.h(1106) : warning C4996: 'strdup': The POSIX name for this item is deprecated.
Instead, use the ISO C++ conformant name: _strdup. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245) : see declaration of 'strdup'
c:\dev\libigl\include\igl\ply.h(1488) : warning C4996: 'strdup': The POSIX name for this item is deprecated.
Instead, use the ISO C++ conformant name: _strdup. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245) : see declaration of 'strdup'
c:\dev\libigl\include\igl\ply.h(1587) : warning C4996: 'strdup': The POSIX name for this item is deprecated.
Instead, use the ISO C++ conformant name: _strdup. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245) : see declaration of 'strdup'
c:\dev\libigl\include\igl\ply.h(1644) : warning C4996: 'strdup': The POSIX name for this item is deprecated.
Instead, use the ISO C++ conformant name: _strdup. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245) : see declaration of 'strdup'
c:\dev\libigl\include\igl\ply.h(2477) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of
data
c:\dev\libigl\include\igl\ply.h(2891) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of
data
c:\dev\libigl\include\igl\ply.h(2919) : warning C4996: 'strdup': The POSIX name for this item is deprecated.
Instead, use the ISO C++ conformant name: _strdup. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245) : see declaration of 'strdup'
c:\dev\libigl\include\igl\ply.h(2984) : warning C4996: 'strdup': The POSIX name for this item is deprecated.
Instead, use the ISO C++ conformant name: _strdup. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245) : see declaration of 'strdup'
c:\dev\libigl\include\igl\ply.h(2989) : warning C4996: 'strdup': The POSIX name for this item is deprecated.
Instead, use the ISO C++ conformant name: _strdup. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245) : see declaration of 'strdup'
c:\dev\libigl\include\igl\ply.h(3056) : warning C4996: 'strdup': The POSIX name for this item is deprecated.
Instead, use the ISO C++ conformant name: _strdup. See online help for details.
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(245) : see declaration of 'strdup'
C:/dev/boost\boost/config/abi_prefix.hpp(19) : warning C4103: 'c:\dev\boost\boost\config\abi_prefix.hpp' : alignment
changed after including header, may be due to missing #pragma pack(pop)
C:/dev/boost\boost/system/error_code.hpp(31) : warning C4103: 'c:\dev\boost\boost\system\error_code.hpp' : alignment
changed after including header, may be due to missing #pragma pack(pop)
C:/dev/boost\boost/config/abi_suffix.hpp(20) : warning C4103: 'c:\dev\boost\boost\config\abi_suffix.hpp' : alignment
changed after including header, may be due to missing #pragma pack(pop)
C:/dev/boost\boost/system/error_code.hpp(512) : warning C4103: 'c:\dev\boost\boost\system\error_code.hpp' :
alignment changed after including header, may be due to missing #pragma pack(pop)
C:/dev/boost\boost/thread/exceptions.hpp(26) : warning C4103: 'c:\dev\boost\boost\thread\exceptions.hpp' : alignment
changed after including header, may be due to missing #pragma pack(pop)
C:/dev/boost\boost/thread/exceptions.hpp(223) : warning C4103: 'c:\dev\boost\boost\thread\exceptions.hpp' :
alignment changed after including header, may be due to missing #pragma pack(pop)
C:/dev/boost\boost/thread/win32/thread_primitives.hpp(211) : warning C4103:
'c:\dev\boost\boost\thread\win32\thread_primitives.hpp' : alignment changed after including header, may be due to
missing #pragma pack(pop)
C:/dev/boost\boost/thread/win32/thread_primitives.hpp(663) : warning C4103:
'c:\dev\boost\boost\thread\win32\thread_primitives.hpp' : alignment changed after including header, may be due to
missing #pragma pack(pop)
C:/dev/boost\boost/thread/win32/thread_heap_alloc.hpp(55) : warning C4103:
'c:\dev\boost\boost\thread\win32\thread_heap_alloc.hpp' : alignment changed after including header, may be due to
missing #pragma pack(pop)
C:/dev/boost\boost/thread/win32/thread_heap_alloc.hpp(406) : warning C4103:
'c:\dev\boost\boost\thread\win32\thread_heap_alloc.hpp' : alignment changed after including header, may be due to
missing #pragma pack(pop)
C:/dev/boost\boost/thread/tss.hpp(12) : warning C4103: 'c:\dev\boost\boost\thread\tss.hpp' : alignment changed after
including header, may be due to missing #pragma pack(pop)
C:/dev/boost\boost/thread/tss.hpp(111) : warning C4103: 'c:\dev\boost\boost\thread\tss.hpp' : alignment changed
after including header, may be due to missing #pragma pack(pop)
c:\dev\libigl\include\igl\copyleft\cgal\assign_scalar.h(23) : error C2899: typename cannot be used outside a
template declaration
c:\dev\libigl\include\igl\copyleft\cgal\assign_scalar.h(26) : error C2899: typename cannot be used outside a
template declaration
c:\dev\libigl\include\igl\copyleft\cgal\assign_scalar.cpp(11) : error C2899: typename cannot be used outside a
template declaration
c:\dev\libigl\include\igl\copyleft\cgal\assign_scalar.cpp(18) : error C2899: typename cannot be used outside a
template declaration
c:\dev\libigl\include\igl\copyleft\cgal\assign_scalar.cpp(22) : error C2899: typename cannot be used outside a
template declaration

Error in compile_gptoolbox_mex_adjusted (line 68)
mex( ...

Thanks for your help

alecjacobson commented 8 years ago

Same thing but this time find the boost include dir

On Friday, 11 March 2016, oqilipo notifications@github.com wrote:

Hi

As I mentioned above, I already installed CGAL and the "Triangulation_3 demo" works fine.

Now I've added

  • C:\dev\CGAL-4.8-beta1\auxiliary\gmp\include as include path to the script:

path_to_boost='C:/dev/boost_1_59_0'; path_to_cgal='C:/dev/CGAL-4.8-beta1'; cgal_version='-vc120-mt-4.8'; path_to_eigen='C:/dev/eigen'; path_to_eltopo='C:/dev/eltopo'; path_to_libigl='C:/dev/libigl'; path_to_gmp = 'C:\dev\CGAL-4.8-beta1\auxiliary\gmp\include';

MEXOPTS={'-v','-largeArrayDims','-DMEX'}; MSSE42='CXXFLAGS=$CXXFLAGS -msse4.2'; STDCPP11='CXXFLAGS=$CXXFLAGS -std=c++11';

BOOST_INC=sprintf('-I%s',path_to_boost); BOOST_LIB=strsplit(sprintf('-L%s/lib64-msvc-12.0 -lboost_thread-vc120-mt-1_59 -lboost_system-vc120-mt-1_59',path_to_boost));

CGAL_INC=sprintf('-I%s/include',path_to_cgal); CGAL_LIB=strsplit(sprintf('-L%s/build/lib -lCGAL%s -lCGAL_Core%s -llibgmp-10.lib -llibmpfr-4.lib',path_to_cgal,cgal_version,cgal_version)); CGAL_FLAGS='CXXFLAGS=\$CXXFLAGS -frounding-math';

EIGEN_INC=sprintf('-I%s/',path_to_eigen); GMP_INC=sprintf('-I%s',path_to_gmp);

ELTOPO_INC= sprintf('-I%s/',path_to_eltopo); ELTOPO_LIB= strsplit(sprintf('-L%s/eltopo3d -leltopo_release',path_to_eltopo)); CLANG={'CXX=/usr/bin/clang++','LD=/usr/bin/clang++'}; FRAMEWORK_LDFLAGS='LDFLAGS=\$LDFLAGS -framework Foundation -framework AppKit -framework Accelerate'; NOOPT_LDOPTIMFLAGS='LDOPTIMFLAGS="-O "';

% See libigl documentation. In short, Libigl is a header-only library by % default: no compilation needed (like Eigen). There's an advanced option % to precompile libigl as a static library. This cuts down on compilation time. % It is optional and more difficult to set up. Set this to true only if you % know what you're doing. use_libigl_static_library = false; LIBIGL_INC=sprintf('-I%s/include',path_to_libigl); if use_libigl_static_library LIBIGL_FLAGS='-DIGL_STATIC_LIBRARY'; LIBIGL_LIB=sprintf('-L%s/lib -ligl',path_to_libigl); LIBIGL_LIBEMBREE='-liglembree'; LIBIGL_LIBMATLAB='-liglmatlab'; LIBIGL_LIBCGAL='-liglcgal'; LIBIGL_LIBBOOLEAN='-liglboolean'; LIBIGL_LIBSVD3X3='-liglsvd3x3'; else % mex has a silly requirement that arguments be non-empty, hence the NOOP % defines LIBIGL_FLAGS='-DIGL_SKIP'; LIBIGL_LIB='-DIGL_SKIP'; LIBIGL_LIBMATLAB='-DIGL_SKIP'; LIBIGL_LIBEMBREE='-DIGL_SKIP'; LIBIGL_LIBCGAL='-DIGL_SKIP'; LIBIGL_LIBBOOLEAN='-DIGL_SKIP'; LIBIGL_LIBSVD3X3='-DIGL_SKIP'; end LIBIGL_BASE={LIBIGL_INC,LIBIGL_FLAGS,LIBIGL_LIB,LIBIGL_LIBMATLAB};

SVD_INC=sprintf('-I%s/external/Singular_Value_Decomposition/',path_to_libigl);

EMBREE=[path_to_libigl '/external/embree']; EMBREE_INC=strsplit(sprintf('-I%s -I%s/include/',EMBREE,EMBREE)); EMBREE_LIB=strsplit(sprintf('-L%s/build -lembree -lsys',EMBREE));

CORK=[path_to_libigl '/external/cork']; CORK_INC=sprintf('-I%s/include',CORK); CORK_LIB=strsplit(sprintf('-L%s/lib -lcork',CORK));

%% mex( ... MEXOPTS{:}, MSSE42, STDCPP11, LIBIGL_BASE{:},EIGEN_INC, LIBIGL_LIBCGAL, ... CGAL_INC,CGAL_LIB{:},CGAL_FLAGS, BOOST_INC,BOOST_LIB{:}, GMP_INC,... 'intersect_other.cpp');

mex( ... MEXOPTS{:}, MSSE42, STDCPP11, LIBIGL_BASE{:},EIGEN_INC, ... CGAL_INC,CGAL_LIB{:},CGAL_FLAGS, LIBIGL_LIBCGAL, LIBIGL_LIBBOOLEAN, ... CORK_INC,CORK_LIB{:}, BOOST_INC,BOOST_LIB{:}, ... 'mesh_boolean.cpp');

Unfortunately there are some new errors

Error using mex intersect_other.cpp c:\dev\libigl\include\igl\ply.h(520) : warning C4267: 'Argument': Konvertierung von 'size_t' nach 'int', Datenverlust m”glich c:\dev\libigl\include\igl\ply.h(1070) : warning C4244: '=': Konvertierung von 'double' in 'float', m”glicher Datenverlust c:\dev\libigl\include\igl\ply.h(2477) : warning C4244: '=': Konvertierung von 'double' in 'float', m”glicher Datenverlust c:\dev\libigl\include\igl\ply.h(2891) : warning C4244: '=': Konvertierung von 'double' in 'float', m”glicher Datenverlust C:/dev/boost_1_59_0\boost/config/abi_prefix.hpp(19) : warning C4103: "c:\dev\boost_1_59_0\boost\config\abi_prefix.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". C:/dev/boost_1_59_0\boost/system/error_code.hpp(31) : warning C4103: "c:\dev\boost_1_59_0\boost\system\error_code.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". C:/dev/boost_1_59_0\boost/config/abi_suffix.hpp(20) : warning C4103: "c:\dev\boost_1_59_0\boost\config\abi_suffix.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". C:/dev/boost_1_59_0\boost/system/error_code.hpp(512) : warning C4103: "c:\dev\boost_1_59_0\boost\system\error_code.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". C:/dev/boost_1_59_0\boost/thread/exceptions.hpp(26) : warning C4103: "c:\dev\boost_1_59_0\boost\thread\exceptions.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". C:/dev/boost_1_59_0\boost/thread/exceptions.hpp(223) : warning C4103: "c:\dev\boost_1_59_0\boost\thread\exceptions.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". C:/dev/boost_1_59_0\boost/thread/win32/thread_primitives.hpp(221) : warning C4103: "c:\dev\boost_1_59_0\boost\thread\win32\thread_primitives.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". C:/dev/boost_1_59_0\boost/thread/win32/thread_primitives.hpp(667) : warning C4103: "c:\dev\boost_1_59_0\boost\thread\win32\thread_primitives.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". C:/dev/boost_1_59_0\boost/thread/win32/thread_heap_alloc.hpp(55) : warning C4103: "c:\dev\boost_1_59_0\boost\thread\win32\thread_heap_alloc.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". C:/dev/boost_1_59_0\boost/thread/win32/thread_heap_alloc.hpp(406) : warning C4103: "c:\dev\boost_1_59_0\boost\thread\win32\thread_heap_alloc.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". C:/dev/boost_1_59_0\boost/thread/tss.hpp(12) : warning C4103: "c:\dev\boost_1_59_0\boost\thread\tss.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". C:/dev/boost_1_59_0\boost/thread/tss.hpp(111) : warning C4103: "c:\dev\boost_1_59_0\boost\thread\tss.hpp": Ausrichtung wurde nach Einschlieáen des Headers ge„ndert, m”glicherweise fehlt "#pragma pack(pop)". c:\dev\libigl\include\igl\copyleft\cgal\assign_scalar.h(23) : error C2899: Der Typname kann nicht auáerhalb einer Vorlagendeklaration verwendet werden c:\dev\libigl\include\igl\copyleft\cgal\assign_scalar.h(26) : error C2899: Der Typname kann nicht auáerhalb einer Vorlagendeklaration verwendet werden c:\dev\libigl\include\igl\copyleft\cgal\assign_scalar.cpp(11) : error C2899: Der Typname kann nicht auáerhalb einer Vorlagendeklaration verwendet werden c:\dev\libigl\include\igl\copyleft\cgal\assign_scalar.cpp(18) : error C2899: Der Typname kann nicht auáerhalb einer Vorlagendeklaration verwendet werden c:\dev\libigl\include\igl\copyleft\cgal\assign_scalar.cpp(22) : error C2899: Der Typname kann nicht auáerhalb einer Vorlagendeklaration verwendet werden

Error in compile_gptoolbox_mex_adjusted (line 68) mex( ...

— Reply to this email directly or view it on GitHub https://github.com/alecjacobson/gptoolbox/issues/10#issuecomment-195396831 .

oqilipo commented 8 years ago

Are you sure? I think the boost dir is found, otherwise there would be an error like:

Cannot open include file: 'boost/config.hpp':

That happens if I rename: "C:\dev\boost\boost" the place where all th include files are located.

But the actual error is

c:\dev\libigl\include\igl\copyleft\cgal\assign_scalar.h(23) : error C2899: typename cannot be used outside a
template declaration
c:\dev\libigl\include\igl\copyleft\cgal\assign_scalar.h(26) : error C2899: typename cannot be used outside a
template declaration
c:\dev\libigl\include\igl\copyleft\cgal\assign_scalar.cpp(11) : error C2899: typename cannot be used outside a
template declaration
c:\dev\libigl\include\igl\copyleft\cgal\assign_scalar.cpp(18) : error C2899: typename cannot be used outside a
template declaration
c:\dev\libigl\include\igl\copyleft\cgal\assign_scalar.cpp(22) : error C2899: typename cannot be used outside a
template declaration

Thank you very much.

alecjacobson commented 8 years ago

What happens if you remove "typename" from those lines?

On Tue, Apr 12, 2016 at 2:52 AM, oqilipo notifications@github.com wrote:

Are you sure? I think the boost dir is found, otherwise there would be an error like:

Cannot open include file: 'boost/config.hpp':

That happens if I rename: "C:\dev\boost\boost" the place where all th include files are located.

But the actual error is

c:\dev\libigl\include\igl\copyleft\cgal\assign_scalar.h(23) : error C2899: typename cannot be used outside a template declaration c:\dev\libigl\include\igl\copyleft\cgal\assign_scalar.h(26) : error C2899: typename cannot be used outside a template declaration c:\dev\libigl\include\igl\copyleft\cgal\assign_scalar.cpp(11) : error C2899: typename cannot be used outside a template declaration c:\dev\libigl\include\igl\copyleft\cgal\assign_scalar.cpp(18) : error C2899: typename cannot be used outside a template declaration c:\dev\libigl\include\igl\copyleft\cgal\assign_scalar.cpp(22) : error C2899: typename cannot be used outside a template declaration

Thank you very much.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/alecjacobson/gptoolbox/issues/10#issuecomment-208736078

oqilipo commented 8 years ago

thanks a lot, now it works: Matlab code: intersect_other_compile.m

arch = '64';
msvc = '12';

path_to_boost='C:\dev\boost';
boost_version = '1_58';
path_to_cgal='C:\dev\CGAL';
cgal_version='4.8';
path_to_eigen='C:\dev\eigen';
path_to_libigl='C:\dev\libigl';
path_to_gmp = 'C:\dev\CGAL\auxiliary\gmp';

MEXOPTS={'-v','-largeArrayDims','-DMEX'};
MSSE42='CXXFLAGS=$CXXFLAGS -msse4.2';
STDCPP11='CXXFLAGS=$CXXFLAGS -std=c++11';

BOOST_INC=sprintf('-I%s',path_to_boost);
BOOST_LIB=strsplit(sprintf('-L%s/lib%s-msvc-%s.0 -lboost_thread-vc%s0-mt-%s.lib -lboost_system-vc%s0-mt-%s.lib',...
    path_to_boost, arch, msvc, msvc,boost_version, msvc,boost_version));

CGAL_INC=sprintf('-I%s/include',path_to_cgal);
CGAL_LIB=strsplit(sprintf('-L%s/lib -lCGAL-vc%s0-mt-%s.lib -lCGAL_Core-vc%s0-mt-%s.lib',...
    path_to_cgal, msvc,cgal_version, msvc,cgal_version));
CGAL_FLAGS='CXXFLAGS=\$CXXFLAGS -frounding-math';

EIGEN_INC=sprintf('-I%s/',path_to_eigen);
GMP_INC=sprintf('-I%s/include',path_to_gmp);
GMP_LIB=strsplit(sprintf('-L%s/lib  -llibgmp-10.lib -llibmpfr-4.lib',path_to_gmp));

LIBIGL_INC=sprintf('-I%s/include',path_to_libigl);
LIBIGL_FLAGS='-DIGL_SKIP';
LIBIGL_LIB='-DIGL_SKIP';
LIBIGL_LIBMATLAB='-DIGL_SKIP';
LIBIGL_LIBEMBREE='-DIGL_SKIP';
LIBIGL_LIBCGAL='-DIGL_SKIP';
LIBIGL_LIBBOOLEAN='-DIGL_SKIP';
LIBIGL_LIBSVD3X3='-DIGL_SKIP';
LIBIGL_BASE={LIBIGL_INC,LIBIGL_FLAGS,LIBIGL_LIB,LIBIGL_LIBMATLAB};

mex( ...
  MEXOPTS{:}, MSSE42, STDCPP11, LIBIGL_BASE{:},EIGEN_INC, LIBIGL_LIBCGAL, ...
  CGAL_INC,CGAL_LIB{:},CGAL_FLAGS, BOOST_INC, BOOST_LIB{:}, GMP_INC, GMP_LIB{:},...
  'intersect_other.cpp');

Matlab example: intersect_other_example

close all; clearvars; opengl hardware;

addpath(genpath('../../matGeom/'));

[V1, F1] = createTetrahedron;
[V2, F2] = createIcosahedron;
V2 = V2+0.5;

figure('Units','pixels','Color','w','ToolBar','figure','renderer','opengl');
axis on; axis equal
title('intersect other example')
H_Light(1) = light; H_Light(2) = light('Position', -1*(get(H_Light,'Position')));
view(3)
hold on

PatchProps.EdgeColor = 'k';
PatchProps.FaceColor = [0.8, 0.8, 0.7];
PatchProps.FaceAlpha = 0.5;
PatchProps.EdgeLighting = 'none';
PatchProps.FaceLighting = 'gouraud';

patch('Faces', F1, 'Vertices',V1, PatchProps)
patch('Faces', F2, 'Vertices',V2, PatchProps)

IF = intersect_other(V1,F1,V2,F2);

PatchProps.FaceColor = 'g';
patch('Faces', F1(IF(:,1),:), 'Vertices',V1, PatchProps)
PatchProps.FaceColor = 'r';
patch('Faces', F2(IF(:,2),:), 'Vertices',V2, PatchProps)

Result: intersect_other_example

Thank you very much!

alecjacobson commented 8 years ago

Thank you for posting the working code.

On Mon, Apr 18, 2016 at 3:25 PM, oqilipo notifications@github.com wrote:

Closed #10 https://github.com/alecjacobson/gptoolbox/issues/10.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/alecjacobson/gptoolbox/issues/10#event-631833492