Cannot find -lglfw or lglfw3


#1

I used the examples from glfw Source Package ,but when i run the make command ,it told me this error:

[root@localhost examples]# make

[ 4%] Linking C executable splitview
/usr/bin/ld: cannot find -lglfw
collect2: error: ld returned 1 exit status
make[2]: *** [splitview] Error 1
make[1]: *** [CMakeFiles/splitview.dir/all] Error 2
make: *** [all] Error 2

[root@localhost examples]# pwd
/usr/local/GLFX/glfw/example

i am sure i have install this lib,this is my lib:

[root@localhost lib64]# find . -name “libglfw*”
./libglfw.so.3
./libglfw.so.3.2
[root@localhost lib64]# pwd
/usr/lib64

so why it can\t find this lib?And what should i do to run the example?


#2

I’m assuming this is a follow on from your previous posts, so you’re on CentOS 6 and you’ve downloaded the source package and ran cmake then make?

I think this should have compiled and linked the glfw libraries, examples and tests in one go unless you chose the option not to.

Note that it looks like we’re on different time zones, so it’s worth explaining a little more information in your posts to help debugging the issue from a distance.


#3

It’s possible that your linker is not configured to look in the lib64 folder. You can check this with the following command: ld --verbose | grep SEARCH_DIR.