problem with dev c++

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
haraelendil
Posts: 6
Joined: Sun Jan 30, 2005 4:56 pm

problem with dev c++

Post by haraelendil »

Hi all,

I made the Tutorial 1.b Setting up the Dev-C++ IDE to start compiling with Dev C++, but when I want to compile, i have this:
Image

Does somebody know where is the problem??
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Post the code, please...
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

Code: Select all

const wchar_t string[] = L"your text";
device->getGUIEnvironment()->addStaticText(string, irr::core::rect<s32>(10,10),...)
you messed code somehowe probably...
haraelendil
Posts: 6
Joined: Sun Jan 30, 2005 4:56 pm

Post by haraelendil »

I have this code, i found it here:

Code: Select all

// HelloUniverse.cpp
// Include the Irrlicht header
#include "irrlicht.h"

// Irrlicht Namespaces
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);
}
kaeles-notlogged

Post by kaeles-notlogged »

why are you calling your return as a function??
it should just be
return 0;
not return(0);
haraelendil
Posts: 6
Joined: Sun Jan 30, 2005 4:56 pm

Post by haraelendil »

I just made a copy of the tutorial, i didn't change anything, but, i can't compile :cry:
Tom87@21
Posts: 6
Joined: Wed Nov 17, 2004 7:40 pm

Post by Tom87@21 »

I don't remember if I had this problem, but I have a old code snipet :

wchar_t Infos[512] = {0};
float OldNumber;
...
swprintf( Infos, sizeof(Infos), L"Old Number = %.2e N", OldNumber );

IGUIStaticText* static_text = gui->addStaticText( Infos, rect<s32>(10,10,620,50), true );


And it was compiled without problems with IrrLicht 0.7 under DevC++ 5 beta
Time doesn't wait !
Post Reply