fatal error C1083: Cannot open include file: 'irrlicht.h' ??

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Eagle
Posts: 20
Joined: Tue Nov 27, 2007 7:50 pm
Location: USA
Contact:

fatal error C1083: Cannot open include file: 'irrlicht.h' ??

Post by Eagle »

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 for your help ;)
shogun
Posts: 162
Joined: Wed Sep 05, 2007 11:02 am
Location: inside

Post by shogun »

It means the compiler can't finde the irrlicht.h.

You can fix it by adding the right search directory, where the compiler can find the irrlicht.h.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

it means that the path you've supplied to irrlicht.h is incorrect. most likely that's in your IDE's include settings so check it there.
Image Image Image
Eagle
Posts: 20
Joined: Tue Nov 27, 2007 7:50 pm
Location: USA
Contact:

Post by Eagle »

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?
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Oh dear. I'll try to be gentle.

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.

Select Configuration Properties -> C/C++ -> General.

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.

Select Configuration Properties -> Linker -> General.

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.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
shogun
Posts: 162
Joined: Wed Sep 05, 2007 11:02 am
Location: inside

Post by shogun »

Eagle
Posts: 20
Joined: Tue Nov 27, 2007 7:50 pm
Location: USA
Contact:

YES!

Post by Eagle »

Rogerborg you are so Sweet! Thank you for taking the time to show me
this!
Highlanders are so Sexy! :wink: Thanks Rogerborg, if you need a model
or something just let me know~

always~
Vickie ;)
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

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.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Eagle
Posts: 20
Joined: Tue Nov 27, 2007 7:50 pm
Location: USA
Contact:

Post by Eagle »

That is Awesome Rogerborg! I hope to see you on the IRC channel~ ;)

your friend always~
Vickie ;)
Saturn
Posts: 418
Joined: Mon Sep 25, 2006 5:58 pm

Post by Saturn »

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.
Yeah, right. ;)
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

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.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
shogun
Posts: 162
Joined: Wed Sep 05, 2007 11:02 am
Location: inside

Post by shogun »

Yeah, what a pity.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

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 :)
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

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... :lol:

I was wondering why you think I'm an "old man" ??? :shock:
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... :lol:
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Well, you're grumpy, which is often a symptom of being old. :P
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Post Reply