2
I am compiling an example code provided on the GLFW bookstore website as follows: g++ main.cpp -o main.exe glfw3dll.a
<- this way it is possible to compile, but what if I want to change the files from place?
My intention is to maintain a structure
+include
--GLFW/glfw3.h
+libs
--glfw3dll.a
But I can’t link the library with the command -L/libs/ -lglfw3dll
g++ main.cpp -o main.exe -L/libs/ -lglfw3dll
ld.exe: cannot find -lglfw3dll
collect.exe: error: ld returned 1 exit status
Since the compiler can’t find the bookstore if I am informing in the command where it is?
The bookstore you specified is a Static Linked library, isn’t it? As far as I know, this dynamic linking process only works with dynamic link libraries (ending with .so). Recompile your glfw3.h as a dynamic link library and try to do this.
– Sid