Spice
Spice

Reputation: 256

linking problems with glfw static libraries

I am trying to link these GLFW static libraries to my c++ project with eclipse:

But eclipse throws this error: Linking Error From what I can tell, it seems to find them just fine. However, the linking error says that the libraries are incompatible. I am using mingw 64-bit to compile so it would make sense that I use the 64-bit version of the GLFW that came with the .zip file. But even then, I tried linking it with the 32-bit version of GLFW and it still throws the same error. Does anyone know why it is doing this?

Just in case, this is how I build the file:

g++ "-LE:\Extra\8) Programs\Files\GLFW\lib-mingw-w64" -o OpenGL.exe "src\Main.o" -lglfw3 -lglfw3dll

Upvotes: 0

Views: 1655

Answers (1)

Janakiraman Kannan
Janakiraman Kannan

Reputation: 46

One quick way would be to include the full path of the library files.

  • And link either the static or the shared library. Not both of them.
  • If the full path works, then the path variables may not be set properly

Upvotes: 1

Related Questions