[SOLVED] tutorial hello world compile errors

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
squarebal

[SOLVED] tutorial hello world compile errors

Post by squarebal »

I tried doing the first tutorial on this site, and ran into a few compile errors: obviously expected. So, I work on all my errors in my code. Then, I get down to 3 errors that appear to not be accessable in my code.
I'm using:
WinXP sp2, DevC++ v.4, and Irrlicht v.0.8

In the compiler and linker output window, I get:

Code: Select all

In file included from C:\IRRLIC~1.8\include\irrlicht.h:32,
                 from c:\docume~1\owner\irrlicht\tutori~1\hellow~1.cpp:1:
C:\IRRLIC~1.8\include\aabbox3d.h: In method `void irr::core::aabbox3d<T>::getEdges(irr::core::vector3d<T> *) const':
C:\IRRLIC~1.8\include\aabbox3d.h:217: unknown escape sequence `\I'
C:\IRRLIC~1.8\include\aabbox3d.h:217: unknown escape sequence `\i'
Meanwhile, in the Compile tab below, I only get:

Code: Select all

Line  Unit                                 Message
32    c:\irrlic~1.8\include\irrlicht.h     from c:\docume~1\owner\irrlicht\tutori~1\hellow~1.cpp:1:
217   c:\irrlic~1.8\include\aabbox3d.h     unknown escape sequence `\I'
217   c:\irrlic~1.8\include\aabbox3d.h     unknown escape sequence `\i'

I put both in, because I know earlier versions of devc++ didn't have the compiler and linker output window[/code]

And now, my code:

Code: Select all

#include <irrlicht.h>

using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;

#pragma comment(lib, "Irrlicht.lib")

int main()
{
    IrrlichtDevice *device =
                    createDevice(EDT_SOFTWARE, dimension2d<s32>(512, 384), 16,
                            false, false, false, 0);
    device->setWindowCaption(L"Hello World! - Irrlicht Engine Demo");
    IVideoDriver* driver = device->getVideoDriver();
    ISceneManager* smgr = device->getSceneManager();
    IGUIEnvironment* guienv = device->getGUIEnvironment();

    guienv->addStaticText(L"Hello World! This is the Irrlicht Software engine!",
             rect<int>(10,10,200,22), true);

    IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2");
    IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );

    if (node)
    {
        node->setMaterialFlag(EMF_LIGHTING, false);
        node->setFrameLoop(0, 310);
        node->setMaterialTexture( 0, driver->getTexture("../../media/sydney.bmp") );
    }

    smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0));

    while(device->run())
    {
        driver->beginScene(true, true, SColor(0,200,200,200));

        smgr->drawAll();
        guienv->drawAll();

        driver->endScene();
    }

    device->drop();

    return 0;
}
Thanks for any help.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

you're not setting the proper "include" and "lib" folders for your compiler.

they're necessary so that your compiler can find all the required source and header files.

check the forums on how to set up devc++ for such purpose.
MikeR
Posts: 767
Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:

Post by MikeR »

Thanks for answering that. I thought that was the problem, but decided to wait for someone else becouse I wasn't sure.

Anyway, here it the link for the dev-CPP tutorial

http://irrlicht.sourceforge.net/tut001b.html

It's what I used to set dev-cpp up, and I don't have any problems with it.
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
squareball
Posts: 11
Joined: Sat Mar 05, 2005 3:41 am

Post by squareball »

I've double-checked the tut, but I'm still having problems. I'm going to try another version of devcpp, and see if I get better/worse results. The one I'm using claims only to be version 4, and is a different interface than the tutorial uses.
squareball
Posts: 11
Joined: Sat Mar 05, 2005 3:41 am

Post by squareball »

Ok, not sure whether that was the problem or not, but either way, the newer version of devcpp (4.9.9.2) has a better interface (than 4), and I was able to determine what goes where. It seems my problem was that my libraries couldn't be found, even though I thought they were put into the right spot.
Thanks for the help.
Post Reply