How can I add GLEW/Other includes in Visual Studio

  • (4 Pages)
  • +
  • « First
  • 2
  • 3
  • 4

55 Replies - 1374 Views - Last Post: 02 February 2018 - 05:29 PM Rate Topic: -----

#46 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14039
  • View blog
  • Posts: 56,188
  • Joined: 12-June 08

Re: How can I add GLEW/Other includes in Visual Studio

Posted 31 January 2018 - 12:53 PM

In Nuget install the following:
glm
glfw

I did and that example ran fine.
Was This Post Helpful? 0
  • +
  • -

#47 snoopy11   User is offline

  • Engineering ● Software
  • member icon

Reputation: 1460
  • View blog
  • Posts: 4,726
  • Joined: 20-March 10

Re: How can I add GLEW/Other includes in Visual Studio

Posted 31 January 2018 - 12:56 PM

have you perhaps

forgot to #include "GL\freeglut.h" ?

what happens if you include the above ?
Was This Post Helpful? 0
  • +
  • -

#48 snoopy11   User is offline

  • Engineering ● Software
  • member icon

Reputation: 1460
  • View blog
  • Posts: 4,726
  • Joined: 20-March 10

Re: How can I add GLEW/Other includes in Visual Studio

Posted 31 January 2018 - 01:03 PM

also your laptop while being low on hard disk and ram,

should be performing better sounds like you may have an infection....

I would try a fresh install of windows 10 with the option to format the hard disk.

see if that helps at all....
Was This Post Helpful? 0
  • +
  • -

#49 FlamingBurrito15   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 71
  • Joined: 13-December 17

Re: How can I add GLEW/Other includes in Visual Studio

Posted 31 January 2018 - 01:23 PM

I did that and I got this

Quote

Severity Code Description Project File Line Suppression State
Error This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft....?LinkID=322105. The missing file is ..\packages\nupengl.core.redist.0.1.0.1\build\native\nupengl.core.redist.targets. Window C:\Users\flami\source\repos\Window\Window\window.vcxproj 142

I went to the site and everything was the same way (everything they said to check was already checked) I also cleared the cache and that did not help...
EDIT: Did you also mean to add the nupengl.core file or just the files you said?

This post has been edited by FlamingBurrito15: 31 January 2018 - 01:25 PM

Was This Post Helpful? 0
  • +
  • -

#50 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14039
  • View blog
  • Posts: 56,188
  • Joined: 12-June 08

Re: How can I add GLEW/Other includes in Visual Studio

Posted 31 January 2018 - 01:29 PM

On a computer with no OpenGL anything installed I made a C++ project.. added those THREE NUGET packages.. copy/pasted from that tutorial in a main, and it ran.
Was This Post Helpful? 0
  • +
  • -

#51 snoopy11   User is offline

  • Engineering ● Software
  • member icon

Reputation: 1460
  • View blog
  • Posts: 4,726
  • Joined: 20-March 10

Re: How can I add GLEW/Other includes in Visual Studio

Posted 31 January 2018 - 01:33 PM

hmmm yes but your computer is functioning properly...

This post has been edited by snoopy11: 31 January 2018 - 01:33 PM

Was This Post Helpful? 0
  • +
  • -

#52 snoopy11   User is offline

  • Engineering ● Software
  • member icon

Reputation: 1460
  • View blog
  • Posts: 4,726
  • Joined: 20-March 10

Re: How can I add GLEW/Other includes in Visual Studio

Posted 31 January 2018 - 03:08 PM

interestingly enough the tutorial you are following

http://www.opengl-tu...ening-a-window/

suggests you download cmake GUI and build using that , good idea as it contains a Tutorials.sln that builds and installs all the opengl dependencies for the cl compiler.
Was This Post Helpful? 0
  • +
  • -

#53 FlamingBurrito15   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 71
  • Joined: 13-December 17

Re: How can I add GLEW/Other includes in Visual Studio

Posted 01 February 2018 - 09:54 PM

Update: I ran the command on the developer prompt for the single file, it noticed the files (even though I did nothing different...) but I still get these errors:

Quote

main.obj : error LNK2019: unresolved external symbol [email protected] referenced in function _main
main.obj : error LNK2019: unresolved external symbol [email protected] referenced in function _main
main.obj : error LNK2019: unresolved external symbol [email protected] referenced in function _main
main.obj : error LNK2019: unresolved external symbol _glfwInit referenced in function _main
main.obj : error LNK2019: unresolved external symbol _glfwTerminate referenced in function _main
main.obj : error LNK2019: unresolved external symbol _glfwWindowHint referenced in function _main
main.obj : error LNK2019: unresolved external symbol _glfwCreateWindow referenced in function _main
main.obj : error LNK2019: unresolved external symbol _glfwWindowShouldClose referenced in function _main
main.obj : error LNK2019: unresolved external symbol _glfwPollEvents referenced in function _main
main.obj : error LNK2019: unresolved external symbol _glfwSetInputMode referenced in function _main
main.obj : error LNK2019: unresolved external symbol _glfwGetKey referenced in function _main
main.obj : error LNK2019: unresolved external symbol _glfwMakeContextCurrent referenced in function _main
main.obj : error LNK2019: unresolved external symbol _glfwSwapBuffers referenced in function _main
main.exe : fatal error LNK1120: 13 unresolved externals

(Assuming I did get these before and mentioned them...)
Also I ran CMake successfully and it did nothing so I tried again and now I get an error saying "Files ma be invalid"...
Was This Post Helpful? 0
  • +
  • -

#54 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14039
  • View blog
  • Posts: 56,188
  • Joined: 12-June 08

Re: How can I add GLEW/Other includes in Visual Studio

Posted 01 February 2018 - 10:13 PM

Remind me again why you would be using command line things when you have the VS ide?
Was This Post Helpful? 0
  • +
  • -

#55 FlamingBurrito15   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 71
  • Joined: 13-December 17

Re: How can I add GLEW/Other includes in Visual Studio

Posted 02 February 2018 - 03:56 PM

Because I did not want it as a project I just wanted it as a single file that I can reference from later and the visual studio IDE won't let me debug/build any single file unless it was in a project...
Was This Post Helpful? 0
  • +
  • -

#56 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 6166
  • View blog
  • Posts: 21,264
  • Joined: 05-May 12

Re: How can I add GLEW/Other includes in Visual Studio

Posted 02 February 2018 - 05:29 PM

Yes, Visual Studio wants that file to be in a project, because VS stores all the compiler settings in its project files, the same way if you were building from the command line and you will eventually be storing your compiler settings in a build script or makefile.

Adding that single file into a VS project does not preclude you from referencing that file in another project. Use the "Add Existing..." option so the file is kept at it's current location instead of being copied into the new project.

In general, though, as your code grows bigger, you will not want to keep all your code in a single file. That way lies madness. You will want to generate a library and/or DLL that has the code that you want to re-use, and simply link in those much like the way you are linking in GLEW and GLUT.
Was This Post Helpful? 0
  • +
  • -

  • (4 Pages)
  • +
  • « First
  • 2
  • 3
  • 4