Jump to content
  • Advertisement
Sign in to follow this  
9drajan

OpenGL Newbie question on OpenGL and VSExpress

This topic is 4520 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I get the following error message when building the first tutorial on NeHe - ------ Build started: Project: opengl_tut1, Configuration: Debug Win32 ------ Compiling... opengl_tut1.cpp Compiling manifest to resources... Linking... LINK : fatal error LNK1104: cannot open file 'GLaux.libkernel32.lib' Build log was saved at "file://g:\Projects\opengl_tut1\Debug\BuildLog.htm" opengl_tut1 - 1 error(s), 0 warning(s) ------------------------------------------------------------------------------ can anyone help me with why this might be happening, or what I'm doing wrong? Thanks DR

Share this post


Link to post
Share on other sites
Advertisement
It can't find the GLaux library during linking. You need to include the directory where the GLuax library resides in the IDE's Lib directory setting (Tools->Options->Projects and Solutions->VC++ Directories).

Maybe you don't even need GLaux? In that case you don't need to link with it. AFAIK it's a very old library that not many use annymore - but of course you may need it.

Share this post


Link to post
Share on other sites
You don't actually have a file named "GLaux.libkernel32.lib", do you? [wink]

Glaux.lib and kernel32.lib are separate static libraries, one for OpenGL auxiliary functions and one for Windows kernel functions.

Share this post


Link to post
Share on other sites
thanks for the responses, have started the projected from scratch once again and will tinker around to get it running.

Share this post


Link to post
Share on other sites
Quote:
Original post by 9drajan
thanks for the responses, have started the projected from scratch once again and will tinker around to get it running.


Your original problem could've been solved by going to the linker settings and typing a single space between the two import library names, though.

Share this post


Link to post
Share on other sites
tried doing that, but was still getting a host of linker errors, so am now in the process of reinstalling the MS Platform SDK, hopefully the problem was caused by my not having installed that properly in the first place

Share this post


Link to post
Share on other sites
Having reinstalled the Platform SDK, and checking to make sure all my project directory settings are OK, I still get the following linker errors on building Lesson 1 in Nehe -
----------------------------------------------------------
Lesson1.obj : error LNK2019: unresolved external symbol __imp__UnregisterClassA@8 referenced in function "void __cdecl KillGLWindow(void)" (?KillGLWindow@@YAXXZ)
Lesson1.obj : error LNK2019: unresolved external symbol __imp__DestroyWindow@4 referenced in function "void __cdecl KillGLWindow(void)" (?KillGLWindow@@YAXXZ)
Lesson1.obj : error LNK2019: unresolved external symbol __imp__ReleaseDC@8 referenced in function "void __cdecl KillGLWindow(void)" (?KillGLWindow@@YAXXZ)
------------------------------------------------------------
actually get 23 such error statements, but I hope that conveys the gist of the problem. Is there something I'm missing out on?

DR

Share this post


Link to post
Share on other sites
The linker cannot find the library that contains the functions "UnregisterClass", "DestroyWindow", etc. Means, that you have to tell your visual studio against wich additional libraries it should link. You probably missed to put "Glaux.lib" there. Youst go to your project settings -> linker (not exactly sure about the exat way, don't have my VS here :-) ). somwhere there you find additional libraries. add them there.

Share this post


Link to post
Share on other sites
If I remember correctly, those specific function entrypoints are in user32.lib.

Share this post


Link to post
Share on other sites
Already had glaux.lib in the library files. Will try adding user32.lib to the list and then building, thanks.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!