5

i would like to use OpenGl in Visual Studio 2010. Following Problem: "error LNK1104: Data "GIU32.lib OpenGL32.lib freeglut.lib glut32.lib" could not be oppend"

I read many Tutorials but they don´t help me :-(. The lib data sets are in "C:\Program Files(x86)\Microsoft SDKs\Windows\v7.0a\lib". The header data sets are in "C:\Program Files(x86)\Microsoft SDKs\Windows\v7.0a\Include\gl" The dll data sets are in "C:\Windows\SysWOW64"

I Use Windows 7 Professional 64Bit.

I put "GIU32.lib OpenGL32.lib freeglut.lib glut32.lib" on Project > Properties > Linker > Input.

4 Answers 4

1

This is what you need to do.

  1. Obtain GLUT for Windows (OpenGL Utility Toolkit) from Nate Robins’ web page. I put it on my C drive. The current documentation for GLUT tells you to go into the glut project folder and build the glut.dsw Visual Studio project. This is a little misleading since there is no glut.dsw file and all the dll, lib etc files you need are already there! So don’t worry about doing this, just download it.

  2. Create a Visual Studio Project such as a new Console Application. For Windows XP: paste the glut32.dll file into: C:\Windows\System32. For Windows 7: place the glut32.dll inside the C:\Windows\SysWOW64 folder instead.

  3. In the Project properties, select C/C++ -> General -> Additional Include Directories and add the location of the glut.h header file. This might be C:\glut-3.7.6-bin\

  4. In the Project properties, select Linker -> General -> Additional Library Directories and add the location of the glut libraries eg C:\glut-3.7.6-bin\

  5. In the Project properties, select Linker -> Input -> Additional Dependencies and add “glut32.lib”.

It should then compile. For a more detailed explanation, plus advice for installing the latest Windows Drivers from the Intel site, see this blog post.

1

Your error message lists all missing files in the same error. That means you didn't set your dependencies correctly, because the linker searched for the file "GIU32.lib OpenGL32.lib freeglut.lib glut32.lib", which doesn't exist, of course.

The file names have to be separated by ";" in the Additional Dependencies section (under Linker > Input). Or, if you use the edit menu by choosing it from the drop-down selection, each dependency has to be in a new line.

So you have to write "GIU32.lib;OpenGL32.lib;freeglut.lib;glut32.lib".

0

If error persists, you just put the libs in wrong place. Try to define additional lib path in project properties (sorry, I don't have VS 2010 around to show you exact location).

0

The DLLs need to be in BOTH system32 and syswow64

See here: http://www.james-bennet.com/2011/10/using-glut-under-visual-studio-2010/

Has a HOWTO including a screenshot of the linker options you need to set.

Not the answer you're looking for? Browse other questions tagged or ask your own question.