View Full Version : Building OpenGL application on Windows 7
01-07-2010, 08:12 AM
Trying to build (C++ code) with visual studio 10 I cannot find external symbols:
Error 1 error LNK2019: unresolved external symbol __imp__glPopMatrix@0 referenced in function "void __cdecl shaft(double,double)" (?shaft@@YAXNN@Z) klystron.obj klystron
I assume these are in glu.dll. Where shuld I put that?
01-07-2010, 09:39 AM
glPopMatrix is in Opengl32.dll
Put opengl32.lib to Project setting, Linker, Input -> Additional dependencies
01-09-2010, 07:57 AM
Thanks for pointing me to Opengl32.
I am using VisualStudio2010 and I do not understand your second sentance.
I am putting the .lib and the .dll in the same dir as tha application source code but I still get same errors.
01-09-2010, 07:54 PM
I dont know how different 2010 is, but let me explain how this is done in Visual C++ express 2008.
At the top of the editor is a button that says 'Project', clicking that brings down a list of options, one of them is "(Project Name) Properties". click that, and it will open a window with a bunch of options. Under configuration properties, if you select 'configuration properties', then 'linker' then 'input', you will see a textfield labeled 'aditional dependencies'. This will either be empty or have other .lib files listed inside. Add 'opengl32.lib' separated from the others by spaces. Then click OK.
That should work.. though you may need to tell Visual Studio where to find your library file. In my case, I have to click 'tools->options->projects and solutions->vc++ directories"
i then select 'library files' and add the name of the folder where my .lib file is in.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.