[Solved] Dev C++ help

Discussion about everything. New games, 3d math, development tips...
Post Reply
MikeR
Posts: 767
Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:

[Solved] Dev C++ help

Post by MikeR »

Ok, sorry to ask this here, but when I asked on the forum for dev C++, I just about got flamed.

To start with, I have no programming background. (at least not useful today)
I've started attempting to learn C++, but wanted to attempt the tutorials. I started out with the "hello world" tutorial. I cannot get it to compile or run. I open the c++ file "hello CPP" and attempt to compile and run. I get a message at the bottom of dev c++ telling me "unable to run". (I click on "compile and run" button)
Do I need to point this page to the actual #include <irrlicht.h> file? or does this folder or file need to be inside the include folder?
I'm lost here. Any help would be greatly appreciated. Oh, and for your info, the last time I used any kind of computer programming, it was with punch cards.
Last edited by MikeR on Wed Jan 19, 2005 1:57 am, edited 3 times in total.
If it exists in the real world, it can be created in 3d

Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
Munku
Posts: 66
Joined: Tue Nov 30, 2004 4:04 pm

Heh

Post by Munku »

Without much knowledge on programming in C++ the task of creating a game is VERY, VERY, *VERY* daunting. I really do suggest that you find some C++ (with STL--Standard Template Library) tutorials and learn the language first. Another good thing to attept to learn is the wchar_t* type, very usefull as well--internationalization and stuff.

Sorry, but I can't point you to a good book/tutorial. I learned C++ on my own and a little in collage.
Umm, don't look at me that way. I'M not the dead one here.

--The One True Marshmellow
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

go to Irrlicht tutorials page: http://irrlicht.sourceforge.net/tutorials.html and look at tutorial named Devcpp ..it is firsth one under External Tutoials section.
MikeR
Posts: 767
Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:

Post by MikeR »

Thanks for the link. I can see what I'm missing.
If it exists in the real world, it can be created in 3d

Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
MikeR
Posts: 767
Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:

Post by MikeR »

Ok, I'm lost.
I followed [This tutorial] to get a handle on Dev C++. I included all the files and folders that the tut asks for. Then, I made a page with the following:
#include "irrlicht.h"
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
int main()
{
IrrlichtDevice *irrDevice = createDevice (EDT_SOFTWARE,
dimension2d<s32>(512, 384),
16,
false,
false,
0);
irrDevice->setWindowCaption (L"Dev-C++ and the Irrlicht Engine!");

IVideoDriver* irrDriver = irrDevice->getVideoDriver();
IsceneManager* irrSceneMgr = irrDevice->getSceneManager();
IGUIEnvironment* irrGUIEnv = irrDevice->getGUIEnvironment();

irrGUIEnv->addStaticText(
L"Hello World! This is the Irrlicht software engine!",
rect<int>(10,10,200,30), true, true, 0, -1);

while(irrDevice->run() )
{
irrDriver->beginScene(true, true, SColor (0, 192, 192, 192) );
irrSceneMgr->drawAll();
irrGUIEnv->drawAll();

irrDriver->endScene();
}
irrDevice->drop();
return(0);
}
For some odd reason, I cannot get this to compile. I get one error. with the following in the dialog box:

compiler: Default compiler
Executing g++.exe...
g++.exe "C:\Dev-Cpp\work\irrdemo\HelloUniverse.cpp" -o "C:\Dev-Cpp\work\irrdemo\HelloUniverse.exe" -I"C:\Dev-Cpp\include\c++\3.3.1" -I"C:\Dev-Cpp\include\c++\3.3.1\mingw32" -I"C:\Dev-Cpp\include\c++\3.3.1\backward" -I"C:\Dev-Cpp\lib\gcc-lib\mingw32\3.3.1\include" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib"
Execution terminated
I'm sure I goofed the code somewhere, but I cannot find it.
Help?

Edit to add:
I found a missing comma and 2 lower case letters, fixed them, but still can't compile. :(
If it exists in the real world, it can be created in 3d

Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
MikeR
Posts: 767
Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:

Post by MikeR »

Ok, found out why I couldn't compile, and fixed that problem.

I am still working on the "Hello World" tutorial, but come up with an error on: IsceneManager* irrSceneMgr = irrDevice->getSceneManager(); saying that IsceneManager isn't defined. :?
Has anyone got this tutorial working? If so, what did you have to do to fix this error?
If it exists in the real world, it can be created in 3d

Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
MikeR
Posts: 767
Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:

Post by MikeR »

I solved my problems with this and have finally got my very first c++ program.

Ok, to fix the problems I had (just in case anyone else has this problem:
Uninstalled using Dev-Dpps own uninstaller
deleted the desktop shortcut
deleted the dev-Cpp folder
deleted dev-cpp.ini
deleted dev-cpp.cfg
restarted my computer
deleted previous download
redownloaded dev-C++
installed Dev-C++
as per instructions on the dev-CPP forum
After doing this, I had an error. To fix the error, I added the irrlicht/bin directory to both the Directories and include directories spaces.
This fixed most of my problems eccept 1.
To fix that one, make sure if you use a capital letter in 1 instance of a word, use it in all instances. :oops:
IsceneManager* irrSceneMgr = irrDevice->getSceneManager();
(note the bolded letters.) :oops: I'm such a noob. Litteraly. :lol:
If it exists in the real world, it can be created in 3d

Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
Post Reply