花了快一周的时间终于能把TUTORIAL中的102调出来了,但是自己要用这个库怎么办呢?又花了一天时间研究,终于!
好吧,教程开始,这里我们以单独实现102为准
1、新建console空项目,新建main.cpp,然后把102中的内容拷贝过去,为了区别不同我们把这里的bunny 改成 cow
2、Properties->Configuration Properties->General->Character Set 改为 Use Multi-Byte Character Set
3、Properties->Configuration Properties->General->SDL checks 改为 No
4、Properties->Configuration Properties->C/C++->General->Additional Include Directories 改为
D:\work_files\libigl\external\nanogui\ext\glew\include;D:\work_files\libigl\external\nanogui\ext\eigen;D:\work_files\libigl\external\nanogui\ext\glfw\include;\usr\local\include;\opt\local\include;D:\work_files\libigl\tutorial;D:\work_files\libigl\tutorial\..\include;D:\work_files\libigl\tutorial\..\external\embree\include;D:\work_files\libigl\tutorial\..\external\nanogui\include;D:\work_files\libigl\tutorial\..\external\nanogui\ext\nanovg\src;%(AdditionalIncludeDirectories)
5、Properties->Configuration Properties->C/C++->Preprocessor->Preprocessor Definitions 改为
WIN32;_WINDOWS;EIGEN_DONT_ALIGN;TETLIBRARY;TRILIBRARY;ANSI_DECLARATORS;_DEBUG;NO_TIMER;IGL_OPENGL_4;IGL_NO_OPENGL;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions)
6、Properties->Configuration Properties->Linker->Input->Additional Dependencies改为
kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib;glu32.lib;opengl32.lib;embree.lib;nanogui.lib;embree_sse41.lib;embree_sse42.lib;embree_avx.lib;embree_avx2.lib;simd.lib;lexers.lib;sys.lib;%(AdditionalDependencies)
7、将D:\work_files\libigl\tutorial\build\Debug目录下的lib文件拷到我们的项目中
包括
embree.lib
embree_avx.lib
embree_avx2.lib
embree_sse41.lib
embree_sse42.lib
lexers.lib
simd.lib
sys.lib
8、将D:\work_files\libigl\tutorial\build\nanogui\Debug目录下的nanogui.lib拷到我们的项目中
运行,duang!~