kpaonaut / Computer-Aided-Design

Utilizing openGL for CAD programming. Course project for Introduction to Computer-aided Design 2018 fall @ Tsinghua University. Adapted from CMU course Computer Aided Design.
http://www.aray.pub/2018/12/20/CAD/
4 stars 5 forks source link

The correct way to compile with g++ #1

Open kpaonaut opened 6 years ago

kpaonaut commented 6 years ago

g++ -stdlib=libc++ -lglfw3 -framework CoreVideo -framework OpenGL -framework IOKit -framework Cocoa -framework Carbon -o a test.cpp WRONG!

kpaonaut commented 6 years ago

g++ -std=c++11 -stdlib=libc++ -lglfw3 -framework CoreVideo -framework OpenGL -framework IOKit -framework Cocoa -framework GLUT -o a test.cpp glad.c

kpaonaut commented 6 years ago

g++ -std=c++11 -stdlib=libc++ -lglfw3 -framework CoreVideo -framework OpenGL -framework IOKit -framework Cocoa -framework GLUT -o a ../libSOIL.a main.cpp ../glad.c

kpaonaut commented 5 years ago

g++ -I ../freetype -L/usr/local/lib -std=c++11 -stdlib=libc++ -lglfw3 -framework CoreVideo -framework OpenGL -framework IOKit -framework Cocoa -framework GLUT -o a ../libSOIL.a /usr/local/lib/libfreetype.dylib main.cpp ../glad.c after freetype is installed in system under /usr/local/lib

kpaonaut commented 5 years ago

Edit: run source compile.sh

Physics Engine project: Everytime before make, we need to specify the path to search dynamic libs by export DYLD_FALLBACK_LIBRARY_PATH=/Users/WangRui/Programming/CAD/physicsEngine/lib/lib

Notice that we installed an old version of libpng(which differs from the default libpng in the system) under this directory (using make install called from the source file project).