What does this mean and how do I fix it?
-----------------------------------------------------------------
Error 1 fatal error C1083: Cannot open include file: 'irrlicht.h': No such file or directory c:\irrlicht engine\irrlicht-1.3.1\irrlicht-1.3.1\examples.net\3rdpersoncam\3rdpersoncam.cpp 6
-----------------------------------------------------------------
Thanks guys, I guess I don't understand how to define the path. I looked
through every line of code and could not find where you define the path
to the "include" file. So then I just pasted the 3rd person project into the
root directory of the engine with hope ith could find the "include" file but it
didn't work. I still get the same error. Could you tell me how to make the
path to the "include" file work?
First up (and based on your previous post), I need to let you know that C++ is not a ".NET" language. What you've got there is good old fashioned C++ source. I'm not sure why you're calling it "C++ .net" or putting the project in the .NET part of the Irrlicht SDK.
The problem is that the project file that builds that source ("3rdPersonCam.vcproj") doesn't specify any include or library paths. You'll have to tell the project (which then tells the compiler) where to find "irrlicht.h". Where it can find it depends on where it is on your system. For example, on my system I have an Irrlicht SDK in c:\dev\irrlicht-clean, and the irrlicht.h file is in c:\dev\irrlicht-clean\include.
Assuming that you're using Microsoft Visual Studio, then first off, save out a .sln (solution) file to contain that project, e.g. "3rdPersonCam.sln". Visual Studio should prompt you to do that when you compile it, so I assume you've already done that.
Then in the Solution window on the left, right click on the bold 3rdPersonCam project, and select Properties. This should bring up a "3rdPersonCam Property Pages" dialog.
In Additional Include Directories, add the path to your "irrlicht.h" file. You can give a relative or absolute path. For example, on my system, I added "C:\dev\irrlicht-clean\include".
While you're in there, you'll also have to add the path to the Irrlicht library.
In Additional Library Directories, add the path to your Irrlicht.lib, for example "c:\dev\irrlicht-clean\lib\Win32-visualstudio".
You might as well do something else while you're in there. When the app runs, it will need to find Irrlicht.dll. You can do that by copying Irrlicht.dll to the application executable's directory, or to somewhere in your path (like c:\windows\system32), or you can just put the application executable into the same directory as the Irrlicht dll. So in Configuration Properties -> Linker -> General, you could change Output File to (e.g.) C:\dev\irrlicht-clean\bin\Win32-VisualStudio\$(ProjectName).exe
If you're not using Microsoft Visual Studio, then you're going to have to suck it up and RTFM for your IDE or compiler to find out how to add include/library paths. If you seriously intend to develop software, then you will need to know this, and to have at least a basic understanding of how compilers and linkers find source and object files.
You'll (probably) have to make some minor changes to the code:
In eventreceiver.h, change:
virtual bool OnEvent(SEvent event)
to:
virtual bool OnEvent(const SEvent & event)
In 3rdPersonCam.cpp, change:
case 'e': driverType = video::EDT_SOFTWARE2;break;
to:
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
I'd also change this line:
device = createDevice(driverType, core::dimension2d<s32>(640, 480),irr::u32(16),true,false,false,&receiver);
to:
device = createDevice(driverType, core::dimension2d<s32>(640, 480),32,false,false,false,&receiver);
Now it should compile (with a lot of warnings) and run.
It may not exactly knock your socks off though, and it leaks memory like a sieve. I'd be very wary about using it as the basis for any serious project.
Last edited by rogerborg on Wed Nov 28, 2007 6:11 pm, edited 2 times in total.
Rogerborg you are so Sweet! Thank you for taking the time to show me
this!
Highlanders are so Sexy! Thanks Rogerborg, if you need a model
or something just let me know~
No problem, it's my pleasure. Please excuse the monkeys as they rattle their cages and shriek "Noob! Burn the noob!". I imagine they'll calm down once they read your bio.
By the way, the Irrlicht IRC channel is a good resource to get you started, as we can walk you through the initial roadblocks more interactively.
rogerborg wrote:Besides, feminine wiles won't work on me: I assume that anyone posting online is a 300 pound trucker named Bubba, avatars and bio photos notwithstanding.
Caveat: anyone claiming to be under 18 is an FBI agent.
I assume that I missed an over-abundance of ZOMG COOTIES! drama on the now mysteriously absent thread that quote came from? Nothing really offensive, I hope.
the thread was removed on request of the initiatior. And since it did not contain much useful stuff I immediately followed this request. Moreover, rogerborg's reply to this thread should have solved all other questions of Eagle
unfortunatly the other thread was deleted that fast, I couldn't clarify one thing, so I'll go a little bit off topic here, again...
I was wondering why you think I'm an "old man" ???
maybe you think the avatar pic is showing me ???
Well, no, the guy in the picture is not me, this guy is realy old, he even died many years ago...
and also I'm not dutch, I just live close to the dutch border and "Nobody's Place" is a club in Venlo where I often hang around...
this just for clearness, I don't want to start another battle here...