What is happening is that glut.h which is being included at the top of partcleSystem.cu is itself trying to include gl.h, which doesn’t exist, and probably should. Not sure why it isn’t included with the projects, but that is why it is failing.
Its look like you don’t have glut.h in the include path.
do the following.
[Step 1]
In the command prompt just type the following
echo %NVSDKCUDA_ROOT%
The result should be something like this
C:\CUDA\NVIDIA Corporation\NVIDIA CUDA SDK
instead, if the result is %NVSDKCUDA_ROOT% itself, then you are in trouble.
There is some problems with your cuda sdk installation. (May something like you have installed 2.0Beta SDK over 1.1. I mean you forgot to uninstall 1.1 version before installing 2.0 or so…etc etc)
If step 1 is successful advance to step 2
[step 2]
Open the particles.sln file
From the solution explorer, right click particles and select properties
In configuration properties → c/c++ → General → Additional include directories add the following “$(NVSDKCUDA_ROOT)/common/inc”
(Quotes around them are must)
In configuration properties → Linker → General → Additional library directories add the following “$(NVSDKCUDA_ROOT)/common/lib”
The problem is that gl.h doesn’t exist inside the include directories, not that the path isn’t correct. I have this problem too, but my path’s work fine (for files that do exist in the same folder). glut.h can be found fine, but since glut.h includes gl.h, and gl.h doesn’t exist, there is a linking problem. It boils down to gl.h not being included in the installation for some odd reason.
Go to the folder where you have installed your VS2005. (eg:- "F:\Program Files\Microsoft Visual Studio 8", your path may be different.). I will refer this location as $ROOT_PATH. Subsequent sections will refer this name.
search for the file “objbase.h”. (If you are not able to find this file, then something wrong with your visual studio installation)
Now execute $ROOT_PATH\Common7\Tools\vsvars32.bat file.
Start Visual studio and compile, this time it should not report any error.
did a search for “objbase.h” in the dir location “C:\Program Files\Microsoft Visual Studio 8” and it didnt return any results.
did another search for the same file (but this time for my whole C: drive and it found it located in “C:\Program Files\Microsoft SDKs\Windows\v6.0\Include”
not sure if im supposed to go ahead and do this step:
But on the other side the problem is the same - we need to say VS that it should use include. lib and bin directories in your C:\Program Files\Microsoft SDKs\Windows\v6.0 directory… so try to add them manualy into VS settings
Definitely some kind of conflict in Windows SDK… :(
It is a lot of work i know but i would try to unisnstall everything what has something to do with VStudio or Win SDK and then try to install it once again (the best way is to install Visual Studio With SDK Included which is something else that VC++2005 Express) and then try to compile simlple Win32 Hello World application and see if will go without problems… :(
I hate to say this but maybe your system is so messed up (after too many installations and uninistalls) that you will have to reinstall whole windows :(
I highly doubt it. It is probably just something wrong with 2005 express under certain conditions, assuming that it has certain files but doesn’t. Mine was doing the same thing (downloaded 2005 express a couple weeks ago, and had the previous version on (2003 I think)). Just copy all of the header (.h) files from the old directory into the new one. I said no to all the conflicting changes and just skipped them, assuming that the new ones that are installed are correct.
That’s the mess u have to face when istalling several instalations of VS in one system… and VC++ 2005 Express is one special case because it doesnt have Win32 support like Pro version or VC++ 2008 Express so u have to install Win SDK separately and this only brings another mess …
But the solution isn’t to reinstall windows. It will get rid of your problems, for now. But if you have a similar problem in the future, which is likely, instead of knowing actually how to fix it, you are going to just know how to reinstall windows. This is a simple case of finding header files from the SDK and copy/pasting to the current path. Reinstalling windows should always be the last thing that you try to do.