0

I am writing code in opengl using C++ in Visual Studio. I have done all the include directories correctly (including glfw include and glfw libraries in the properties), and lib directories correctly but I am getting this error

1.Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol __imp__glViewport@16 referenced in function _main timeinput2 C:\Users\user\source\repos\timeinput2\Source.obj 1
2.Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol __imp__glOrtho@48 referenced in function _main timeinput2 C:\Users\user\source\repos\timeinput2\Source.obj 1
3.Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol __imp__glMatrixMode@4 referenced in function _main timeinput2 C:\Users\user\source\repos\timeinput2\Source.obj 1
4.Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol __imp__glLoadIdentity@0 referenced in function _main timeinput2 C:\Users\user\source\repos\timeinput2\Source.obj 1
5.Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol __imp__glClear@4 referenced in function _main timeinput2 C:\Users\user\source\repos\timeinput2\Source.obj 1

Why?

Kate Gregory
  • 18,808
  • 8
  • 56
  • 85
vivek
  • 1
  • Welcome to SO! Did you add `opengl32` library (appart from the headers) to your project? – Ripi2 Oct 16 '19 at 19:22
  • Did you set all the settings for 'All configurations' and not for a single (Debug/Release) mode? – bloody Oct 16 '19 at 20:03
  • These are linker errors. Nothing about include directories will fix them. Did it work when you ran a release build? If so, check the debug properties which are independent of the release properties. – Kate Gregory Oct 16 '19 at 20:08
  • ripi2 your suggestion worked i got the result. – vivek Oct 17 '19 at 05:39

0 Answers0