问题
I download GLFW source code. Next correct compile with sudo make install, after that library is installed in /usr/local , now when I create project in code blocks I can include GLFW/glfw3.h, but when I try to complie i have errors
How to correct add this library ?
回答1:
Every time I must write this command to terminal: " g++ -std=c++0x main.cpp -lglfw3 -lGL -lX11 -lXi -lXrandr -lXxf86vm -lXinerama -lXcursor -lrt -lm -pthread" , is any posiibility to automatize linking and compilation with Code::Blocks ?
回答2:
Just click :
Project -> Build Options
And then just add liked libs. Of course widouth -
sign.
And you must remember that there are Debug Release and both. So you must enter names of those libs in good target.
来源:https://stackoverflow.com/questions/32549485/how-to-correct-use-glfw3-with-codeblocks-on-ubuntu