visualstudio 2013,freeglut,premake,Jason L. McKesson

Hi,
This is my 2nd post and sorry for that, I hope to be more lucky in Windows.
I tried to build the first tutorial (Jason L. McKesson’s book), using freeglut, glsdk_0_5_2,premake4 and visual studio.
I follow the lazyfoo tutorial to configure visual studio but when I build the solution I see that:

1>------ Rebuild All started: Project: framework, Configuration: Debug Win32 ------
1> Timer.cpp
1> Scene.cpp
1> Mesh.cpp
1> framework.cpp
1> Generating Code…
1> framework.vcxproj -> C:\Users\Davide\Documents\Tutorial 0.3.8\framework\lib\frameworkD.lib
2>------ Rebuild All started: Project: Tut 01 Main, Configuration: Debug Win32 ------
2> tut1.cpp
2>tut1.obj : error LNK2019: unresolved external symbol _glutSwapBuffers referenced in function “void __cdecl display(void)” (?display@@YAXXZ)
2>tut1.obj : error LNK2019: unresolved external symbol _glutLeaveMainLoop referenced in function “void __cdecl keyboard(unsigned char,int,int)” (?keyboard@@YAXEHH@Z)
2>tut1.obj : error LNK2001: unresolved external symbol ___gleBindVertexArray
2>tut1.obj : error LNK2001: unresolved external symbol ___gleGenVertexArrays
2>tut1.obj : error LNK2001: unresolved external symbol ___gleClear
2>tut1.obj : error LNK2001: unresolved external symbol ___gleClearColor
2>tut1.obj : error LNK2001: unresolved external symbol ___gleViewport
2>tut1.obj : error LNK2001: unresolved external symbol ___gleDrawArrays
2>tut1.obj : error LNK2001: unresolved external symbol ___gleBindBuffer
2>tut1.obj : error LNK2001: unresolved external symbol ___gleGenBuffers
2>tut1.obj : error LNK2001: unresolved external symbol ___gleBufferData
2>tut1.obj : error LNK2001: unresolved external symbol ___gleAttachShader
2>tut1.obj : error LNK2001: unresolved external symbol ___gleCompileShader
2>tut1.obj : error LNK2001: unresolved external symbol ___gleCreateProgram
2>tut1.obj : error LNK2001: unresolved external symbol ___gleCreateShader
2>tut1.obj : error LNK2001: unresolved external symbol ___gleDeleteShader
2>tut1.obj : error LNK2001: unresolved external symbol ___gleDetachShader
2>tut1.obj : error LNK2001: unresolved external symbol ___gleDisableVertexAttribArray
2>tut1.obj : error LNK2001: unresolved external symbol ___gleEnableVertexAttribArray
2>tut1.obj : error LNK2001: unresolved external symbol ___gleGetProgramiv
2>tut1.obj : error LNK2001: unresolved external symbol ___gleGetProgramInfoLog
2>tut1.obj : error LNK2001: unresolved external symbol ___gleGetShaderiv
2>tut1.obj : error LNK2001: unresolved external symbol ___gleGetShaderInfoLog
2>tut1.obj : error LNK2001: unresolved external symbol ___gleLinkProgram
2>tut1.obj : error LNK2001: unresolved external symbol ___gleShaderSource
2>tut1.obj : error LNK2001: unresolved external symbol ___gleUseProgram
2>tut1.obj : error LNK2001: unresolved external symbol ___gleVertexAttribPointer
2>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
2>.\Tut 01 MainD.exe : fatal error LNK1120: 28 unresolved externals
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========

What is the problem? I include OpenGL32.lib; freeglut.lib; in the linker/input/additional dependencies…

Not sure why you can’t find glut functions but you do not mention linking with the gle library to resolve the gle undefines

I add glu32.lib in the linker…but I have the same errors.
What’s gle? if I add gle.lib in the linker I have an error, but I don’t download this lib

If i include GL/glut.h instead of freeglut in my code I have only this error:
2>c:\users\davide\documents utorial 0.3.8 ut 01 hello triangle ut1.cpp(174): error C3861: ‘glutLeaveMainLoop’: identifier not found

Ok, I think my problem is how to use the unofficial sdk. I built it but I don’t understand how include the sdk in my project…
I have already read the page: how to use, but it isn’t clear.
Freeglut is configurated: include and lib path configurated
in the linker I added Opengl32.lib and freeglut.lib.

I use premake to the glsdk and I built it in debug and release mode.

Now Visual studio Knows where the sdk is it? or no?
If i build the tutorial I see:
1>------ Build started: Project: Tut 01 Main, Configuration: Debug Win32 ------
1>tut1.obj : error LNK2019: unresolved external symbol _glutSwapBuffers referenced in function “void __cdecl display(void)” (?display@@YAXXZ)
1>tut1.obj : error LNK2019: unresolved external symbol _glutLeaveMainLoop referenced in function “void __cdecl keyboard(unsigned char,int,int)” (?keyboard@@YAXEHH@Z)
1>tut1.obj : error LNK2001: unresolved external symbol ___gleBindVertexArray
1>tut1.obj : error LNK2001: unresolved external symbol ___gleGenVertexArrays
1>tut1.obj : error LNK2001: unresolved external symbol ___gleClear
1>tut1.obj : error LNK2001: unresolved external symbol ___gleClearColor
1>tut1.obj : error LNK2001: unresolved external symbol ___gleViewport
1>tut1.obj : error LNK2001: unresolved external symbol ___gleDrawArrays
1>tut1.obj : error LNK2001: unresolved external symbol ___gleBindBuffer
1>tut1.obj : error LNK2001: unresolved external symbol ___gleGenBuffers
1>tut1.obj : error LNK2001: unresolved external symbol ___gleBufferData
1>tut1.obj : error LNK2001: unresolved external symbol ___gleAttachShader
1>tut1.obj : error LNK2001: unresolved external symbol ___gleCompileShader
1>tut1.obj : error LNK2001: unresolved external symbol ___gleCreateProgram
1>tut1.obj : error LNK2001: unresolved external symbol ___gleCreateShader
1>tut1.obj : error LNK2001: unresolved external symbol ___gleDeleteShader
1>tut1.obj : error LNK2001: unresolved external symbol ___gleDetachShader
1>tut1.obj : error LNK2001: unresolved external symbol ___gleDisableVertexAttribArray
1>tut1.obj : error LNK2001: unresolved external symbol ___gleEnableVertexAttribArray
1>tut1.obj : error LNK2001: unresolved external symbol ___gleGetProgramiv
1>tut1.obj : error LNK2001: unresolved external symbol ___gleGetProgramInfoLog
1>tut1.obj : error LNK2001: unresolved external symbol ___gleGetShaderiv
1>tut1.obj : error LNK2001: unresolved external symbol ___gleGetShaderInfoLog
1>tut1.obj : error LNK2001: unresolved external symbol ___gleLinkProgram
1>tut1.obj : error LNK2001: unresolved external symbol ___gleShaderSource
1>tut1.obj : error LNK2001: unresolved external symbol ___gleUseProgram
1>tut1.obj : error LNK2001: unresolved external symbol ___gleVertexAttribPointer
1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
1>.\Tut 01 MainD.exe : fatal error LNK1120: 28 unresolved externals
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

I read another time all the instruction.
I don’t need sdk or freeglut, all is in the tutorial directory.
So I build in debug and rIelease mode the glsk (in the tutorial directory) succesfully.
When I build the tutorial: 2>LINK : fatal error LNK1104: cannot open file ‘glloadD.lib’

Now the problem are (I think): include path (only freeglut in the glsdk directory?), lib path (only freeglut in the glsdk directory?), linker/additional dependencies (opengl32.lib, freeglut.lib???r another version of freeglut?static?)

[QUOTE=onlyzanna;1259212]I read another time all the instruction.
I don’t need sdk or freeglut, all is in the tutorial directory.
So I build in debug and rIelease mode the glsk (in the tutorial directory) succesfully.
When I build the tutorial: 2>LINK : fatal error LNK1104: cannot open file ‘glloadD.lib’

Now the problem are (I think): include path (only freeglut in the glsdk directory?), lib path (only freeglut in the glsdk directory?), linker/additional dependencies (opengl32.lib, freeglut.lib???r another version of freeglut?static?)[/QUOTE]

Fixed. The solution: copy premake.exe in the windows folder and not in the specific glsdk and tutorial’s folder.

For all peoples like me with vs2013:
Download the tutorial zip
Download premake
You don’t need other (tutorial’s folder include freeglut and glsdk)
Copy premake.exe in the windows folder (In this way is visible!)
In the cmd write: cd PATHTOTHEGLSDKFOLDER
In the cmd write: premake4 vs2010
Open the glsdk.sln file in the glsdk folder
Build (all the solution!) in debug mode and release mode (you can change mode:click sx on solution->properties->configuration properties->change debug in release for all)
In the cmd write: cd PATHTOYOURTUTORIALFOLDER
In the cmd write: premake4 vs2010
Open the TutorialX.sln file in the glsdk folder (X is the number of the tutorial :))
Build (all the solution!) in debug mode and release mode (you can change mode:click sx on solution->properties->configuration properties->change debug in release for all)
In the tutorialX folder there is your exe file!!!click on it!

(Don’t include anything: include path, lib path, linker/additional dependencies are not needed!!!)