2 questions

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.
Post Reply
spiff88
Posts: 15
Joined: Fri Nov 23, 2007 5:52 pm
Location: Michigan

2 questions

Post by spiff88 »

first ive been following the second tutorial: quake3map in vc++ 2008 and the tut uses the iostream.h im not sure where this is located or if theres something else do to because i read it was out dated, my second question aside from that still is with the same tut but when i run it it says it cant find the quake2map.exe file im not sure waht to do here?
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Re: 2 questions

Post by rogerborg »

spiff88 wrote:first ive been following the second tutorial: quake3map in vc++ 2008 and the tut uses the iostream.h
All recent versions include <iostream>, rather than the deprecated <iostream.h>. Are you using some ancient tutorial file that you found on the intartubes (or an old version of Irrlicht)? Your Irrlicht SDK comes with up to date examples, in its /examples directory.

If the .h was a tpyo, and you're having trouble finding <iostream>, then VC++ 2008 comes with a full set of includes, and should be automatically configured to use them. If you're using VC++ 2008 Express, it may not, although I'd be surprised if not.

Have you searched your hard drive for iostream? I'd expect to find it in:

C:\Program Files\Microsoft Visual Studio 9\VC\include

Then, ensure that VC++ 2008 has an include path to that directory:

Tools -> Options -> Projects and Solutions -> VC++ Directories -> Show directories for: Include files.

spiff88 wrote:my second question aside from that still is with the same tut but when i run it it says it cant find the quake2map.exe file im not sure waht to do here?
I'm not surprised it can't find "quake2map.exe", since the link target is "02.Quake3Map.exe", which - if the build completes - should be placed in your Irrlicht bin\Win32-VisualStudio directory.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

iostream.h is called iostream in newer versions of the std-c++ headers. You can simply rename the include statement or disable the warning about it.
Don't know exactly why it would ask for quake2, but it might be due to some working directory issues. Please post the full error message.
spiff88
Posts: 15
Joined: Fri Nov 23, 2007 5:52 pm
Location: Michigan

Post by spiff88 »

fixed the iostream but now im still stuck with the "cannot find .exe"
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

1) Did the example compile fully?

2) Can you find the exe?
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
spiff88
Posts: 15
Joined: Fri Nov 23, 2007 5:52 pm
Location: Michigan

Post by spiff88 »

doesnt compile because it cant find the exe
Steel Style
Posts: 168
Joined: Sun Feb 04, 2007 3:30 pm
Location: France

Post by Steel Style »

Spiff88 it's doesn't need the .exe to compile cause compilation is making the .exe, anyway are you sure that he didn't said can't find the dll?
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

spiff88 wrote:doesnt compile because it cant find the exe
OK, let's go back to basics.

When you "compile" a C/C++ project, two things happen:

1) Each source file (usually .c or .cpp) is compiled into an object file. In this case, there is only one source file, main.cpp, and it should be compiled into main.obj in the examples\02.Quake3Map\Debug directory inside your Irrlicht SDK (by default, the example projects build debug versions).

2) All the object files, plus any required libraries (.lib) files are linked into the final executable file. By default, the executable will be in the same place as the object files, but the Irrlicht VC projects do something different. All the example executables are put in bin\Win32-VisualStudio directory inside the Irrlicht SDK, along with Irrlicht.dll

What I'd suggest you do is this (all paths are relative to the top of your Irrlicht SDK directory):

Open

examples\BuildAllExamples.sln

Right click on 02.Quake3Map_vc8 and select "Set as startup project"

Right click on it and select "Rebuild"

You should see this output:

Code: Select all

1>------ Rebuild All started: Project: 02.Quake3Map_vc8, Configuration: Debug Win32 ------
1>Deleting intermediate and output files for project '02.Quake3Map_vc8', configuration 'Debug|Win32'
1>Compiling...
1>main.cpp
1>Linking...
1>main.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
1>Embedding manifest...
1>Build log was saved at "file://e:\dev\irrlicht-svn\examples\02.Quake3Map\Debug\BuildLog.htm"
1>02.Quake3Map_vc8 - 0 error(s), 1 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
If you don't see "1 succeeded" at the end, then something went wrong. We'll need to see the exact error message.

Then look in bin\Win32-VisualStudio

Among all the other files, you should see:

bin\Win32-VisualStudio\02.Quake3Map.exe
bin\Win32-VisualStudio\Irrlicht.dll

If you don't have both those files, then there's something seriously wrong with your SDK setup; I'd recommend re-installing your SDK.

If you do have them, then you should be able to just click and run 02.Quake3Map.exe

If you can do that, then you should be able to run it from within Visual C++. If you can't, then please post the exact error message that you see, without adding any interpretation (or typos) to it.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
torleif
Posts: 188
Joined: Mon Jun 30, 2008 4:53 am

Post by torleif »

Protip: right click #include, Open Document.

If you can't find iostream (lol wut?) you really need to reinstall your compiler
Post Reply