Linking issue through Eclipse of beginers tutorial

from: learnopengl Getting-started Creating-a-window tutorial

I tried compiling this part and was good; linking however was kinda of a nonsense in the debug window

DEBUG
11:11:30 **** Incremental Build of configuration Debug for project OpenGLHello ****

make all

Building target: OpenGLHello

Invoking: GCC C++ Linker

g++ -L/usr/lib/x86_64-linux-gnu/ -L"/home/mustdos/eclipse-workspace/OpenGLHello/include" -o “OpenGLHello” ./src/glad.o ./src/hello.o -lGL -lpthread -lXrandr -lXi -ldl -lX11

/usr/bin/ld: ./src/hello.o: in function `main’:

/home/mustdos/eclipse-workspace/OpenGLHello/Debug/…/src/hello.cpp:7: undefined reference to `glfwInit’

/usr/bin/ld: /home/mustdos/eclipse-workspace/OpenGLHello/Debug/…/src/hello.cpp:8: undefined reference to `glfwWindowHint’

/usr/bin/ld: /home/mustdos/eclipse-workspace/OpenGLHello/Debug/…/src/hello.cpp:9: undefined reference to `glfwWindowHint’

/usr/bin/ld: /home/mustdos/eclipse-workspace/OpenGLHello/Debug/…/src/hello.cpp:10: undefined reference to `glfwWindowHint’

collect2: error: ld returned 1 exit status

make: *** [makefile:67: OpenGLHello] Error 1

“make all” terminated with exit code 2. Build might be incomplete.

11:11:30 Build Failed. 5 errors, 0 warnings. (took 208ms)

END

I checked inside the glfw3.h and there was the glfwInit() and the rest.

You need to add glfw to the list of libraries.

I tried both glfw and glfw3 and I got undefined tags

/usr/bin/ld: cannot find -lglfw3

and for glfw

/usr/bin/ld: cannot find -lglfw

Is there’s any odd reason?
Ex: naming under AntiX OS?
screenshot

I don’t see a file or symlink named libglfw.so (without any version suffix), which is what the linker needs (the versioned name is used by the run-time loader). Some distributions put those in the -devel package; but headers also go in that package, so if you have the headers you ought to have the unversioned symlink.

From what I understand, you suggest to dig into the -devel package or cmake it if all fails.

Odd, installing the -libglfw3-dev package had the required file; all solved

Odd, installing libglfw3-dev helped
screenshot

I tried adding the library path to include/glfw before installing the -dev package but it failed to see the header…

I cleaned the project and now this works too

NVM, eclipse saved the header locations…
screenshot

Turns out I can use #include “…” instead of #include <…> to use the headers relative to my project than the system.