Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

closed as off-topic by Josh Petrie May 10 '14 at 15:52

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Programming questions that aren't specific to game development are off-topic here, but can be asked on Stack Overflow. A good rule of thumb is to ask yourself "would a professional game developer give me a better/different/more specific answer to this question than other programmers?"" – Josh Petrie
If this question can be reworded to fit the rules in the help center, please edit the question.

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

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

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