0
votes

I am new to C++ and want to include in my first project glfw.

I downloaded the 32-bit windows binaries from: http://www.glfw.org/download.html

I copied the include files and the lib files into my project folder. Then I added them in the project properties (additional include and library directories).

My dependencies look like this:

glfw3.lib opengl32.lib freeglut.lib glew32.lib glu32.lib

Additionally I copied the .dll file into .\System32

Now I get the following errors:

> Fehler    LNK2019 Verweis auf nicht aufgel÷stes externes Symbol
> "__imp__glfwWindowShouldClose" in Funktion
> "_main".  BonbonGame  F:\Programme\TestGame\TestGame\TestGame\TestGame.obj    1
> Fehler    LNK2019 Verweis auf nicht aufgel÷stes externes Symbol
> "__imp__glfwWindowHint" in Funktion
> "_main".  BonbonGame  F:\Programme\TestGame\TestGame\TestGame\TestGame.obj    1
> Fehler    LNK2019 Verweis auf nicht aufgel÷stes externes Symbol
> "__imp__glfwTerminate" in Funktion
> "_main".  BonbonGame  F:\Programme\TestGame\TestGame\TestGame\TestGame.obj    1
> Fehler    LNK2019 Verweis auf nicht aufgel÷stes externes Symbol
> "__imp__glfwSwapBuffers" in Funktion
> "_main".  BonbonGame  F:\Programme\TestGame\TestGame\TestGame\TestGame.obj    1
> Fehler    LNK2019 Verweis auf nicht aufgel÷stes externes Symbol
> "__imp__glfwSetInputMode" in Funktion
> "_main".  BonbonGame  F:\Programme\TestGame\TestGame\TestGame\TestGame.obj    1
> Fehler    LNK2019 Verweis auf nicht aufgel÷stes externes Symbol
> "__imp__glfwPollEvents" in Funktion
> "_main".  BonbonGame  F:\Programme\TestGame\TestGame\TestGame\TestGame.obj    1
> Fehler    LNK2019 Verweis auf nicht aufgel÷stes externes Symbol
> "__imp__glfwMakeContextCurrent" in Funktion
> "_main".  BonbonGame  F:\Programme\TestGame\TestGame\TestGame\TestGame.obj    1
> Fehler    LNK2019 Verweis auf nicht aufgel÷stes externes Symbol
> "__imp__glfwInit" in Funktion
> "_main".  BonbonGame  F:\Programme\TestGame\TestGame\TestGame\TestGame.obj    1
> Fehler    LNK2019 Verweis auf nicht aufgel÷stes externes Symbol
> "__imp__glfwGetKey" in Funktion
> "_main".  BonbonGame  F:\Programme\TestGame\TestGame\TestGame\TestGame.obj    1
> Fehler    LNK2019 Verweis auf nicht aufgel÷stes externes Symbol
> "__imp__glfwCreateWindow" in Funktion
> "_main".  BonbonGame  F:\Programme\TestGame\TestGame\TestGame\TestGame.obj    1

As in the precompiled binaries only visual studio 2010-2013 libraries are included (I assume) I tried to compile it myself. I thought this could cause the errors.

I downloaded the files from "Source Package" . I used the CMake Gui to generate the build. I chose in the configuration "Visual Studio 14 2015" and generated the files. There werde some VC++ files created so I openened them in Visual Studio. I don't know what to do next. I have tried to run the project but I got the message: "Could not start ...\Debug\ALL_BUILD".

3
When you "run" it tries to run or debug your executable - you can't "run" library. Try doing just Build > Build Solution. If there are no errors, you're good :)melak47
I could build the solution and added the new include files, the .lib file and the .dll file. Unfortunately I get the same error messages.Barb
@Barb I had the same problem. Try to use VS 2013 instead. Solved it for me.KaareZ

3 Answers

2
votes

Try using VS 2013 instead. Also, please make sure to post English debugger info. I recommend switching to English all together, it makes finding solutions on the internet a lot easier and you'll be more respected as a programmer if you work in English entirely.

1
votes

If you want to use vs2015 you could try to change toolset from v140 to v120 in project settings (Project->Properties->General->Platform Toolset).

0
votes

They have already released dynamic and static libraries for v140 toolset. Get them from here: http://www.glfw.org/download.html