1,预备环境
安装 brew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
安装glfw:
brew install glfw
安装glew:
brew install glew
2.编译
下载源代码:
git clone https://github.com/AmazingZhen/AsRigidAsPossible_2d.git
下载eigen:
https://eigen.tuxfamily.org/index.php?title=Main_Page
编写Makefile
INC := -I ../3rdParty/eigen-3.4.0 -I /usr/local/Cellar/glfw/3.3.9/include -I /usr/local/Cellar//glew/2.2.0_1/include -I ARAPLD_FLAGS= -L /usr/local/Cellar/glew/2.2.0_1/lib -lGLEW -L/usr/local/Cellar/glfw/3.3.9/lib -lglfw -framework OpenGL#-framework GLUT -framework OpenGL -framework Cocoa -L /usr/local/Cellar/glew/2.2.0_1/lib -lGLEW -L/usr/local/Cellar/glfw/3.3.9/lib -lglfwapp: ARAP/arap.cpp ARAP/main.cpp ARAP/render.cppclang++ -std=c++17 $^ -o $@ $(INC) $(LD_FLAGS)
3,效果
另外:
类似 ldd:
otool -L libglfw3.dylib
类似 nm:
dump_syms libglfw3.dylib