1

I've been trying to include freeglut as described in this post, but when I try to compile a simple project, consisting on an empty main function I get the linker error

error LNK1104: cannot open file 'opengl32.obj' C:\Users\Anders\Dropbox\Special Kursus\AMoN\AMoN\LINK

Any help would be appreciated.

Community
  • 1
  • 1
Anders Schou
  • 184
  • 1
  • 13

1 Answers1

8

Well, you'll have a hard time trying to link opengl32.obj, because unless you're a developer at Microsoft who builds the opengl32.dll API interface DLL you'll never see that compilation unit. What you need to link instead is the symbol reference table library opengl32.lib (note the suffixing .lib).

datenwolf
  • 159,371
  • 13
  • 185
  • 298
  • Thanks, this made me double check the additional dependencies. Forgot to add the ".lib", all I had was "opengl32" – Anders Schou Apr 26 '14 at 13:44
  • It works too with glu32 --> **glu32.lib**. I added this to Project > Properties > Configuration Properties > Linker > Input > Additional Dependencies > Edit > Add the values in the pane (opengl32.lib and/or glu32.lib) > OK > Apply > OK. – Patapoom Oct 14 '19 at 23:19