How to correct use GLFW3 with code::blocks on ubuntu? [duplicate]

杀马特。学长 韩版系。学妹 提交于 2019-12-13 07:46:56

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!