Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

So I'm trying to start a C++, OpenGL project on Visual Studio 2010, and I have put glut.h and glut32.dll in the project directory, along with the glut.dll and glut32.lib files in a folder named "glut" in the project directory.

I have also gone to "Porject Properties -> Linker -> Input -> Additional dependencies" and I have typed in "glut32.lib" at the end, and made sure I am not missing a semicolon.

when I try doing

#include "glut.h"

in the Main.cpp file, it complains

error LNK1104: cannot open file 'glut32.libkernel32.lib'

Am I missing any files? What am I doing wrong here?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

error LNK1104: cannot open file 'glut32.libkernel32.lib'

It looks like you're missing a separator character in your dependency options, glut32.lib and kernel32.lib are separate libraries. If you open the additional dependencies window, every entry should be on a new line.

share|improve this answer
Can't believe I missed that...thank you, I was sure I had semicolons everywhere... –  OddCore Jul 3 '11 at 14:28
add comment

Set the glut32.lib and kernel32.lib paths at Project Properties->configuration Properties->Linker->General->Additional Library Directories. If you don't have these lib files in local system/machine, you can download it from web.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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