How to setup Code::Blocks for GLFW development?
When I want to create a project in Code::Blocks I get a popup with a lots of options. One of them is GLFW project. When I select that I have to name my project and set its location, that is not a problem for me, but than I get this window asking me to select GLFW's location:
I (think I) installed GLFW by typing: "sudo apt-get install libglfw-dev" into the terminal.
What should I type to that window?
Result of `sudo dpkg -L libglfw-dev
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/libglfw-dev
/usr/share/doc/libglfw-dev/copyright
/usr/share/doc/libglfw-dev/readme.html
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libglfw.a
/usr/lib/x86_64-linux-gnu/pkgconfig
/usr/lib/x86_64-linux-gnu/pkgconfig/libglfw.pc
/usr/include
/usr/include/GL
/usr/include/GL/glfw.h
/usr/share/doc/libglfw-dev/changelog.Debian.gz
/usr/lib/x86_64-linux-gnu/libglfw.so
Ok after much search I couldn't find a direct way using the glfw
project template on code::blocks but I saw this tutorial that did that using another means so I hope this help and note after installing glfw
via apt
it seems not able to find what it needs after adding the path /usr
.
Steps:
-
Install the following:
sudo apt install libglew-dev sudo apt install libglm-dev sudo apt install libsdl2-dev sudo apt install libglfw-dev
Create a console application and build and run it
-
Then add the required libraries from the menu
projects --> build options
, select the project name on the left (important), then go the theLinker Settings
tab and use theAdd
button to add the needed libraries such asGL
etc.
Link to video source:
https://www.youtube.com/watch?v=KblXpajVpuU