`DT_DIRECTX8' undeclared in namespace `irr::video'

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
Epsilon
Posts: 38
Joined: Fri Jan 09, 2004 1:46 pm
Location: Argentina

`DT_DIRECTX8' undeclared in namespace `irr::video'

Post by Epsilon »

hi i have readead and following step by step the tutorial 2 but when i compile (with Dev-C++), i got the next error:

`DT_DIRECTX8' undeclared in namespace `irr::video'

the line that causes this problem is it:

IrrlichtDevice *device = createDevice(video::DT_DIRECTX8 , core::dimension2d<s32>(640, 480), 16, false, false, &receiver);

the only namespace is irr.

the tutorial 1 works fine, but this not, and i have tryed copy the "createDevice" line of the Tut1 to the Tut2 and i got the some problem:

IrrlichtDevice *device = createDevice(video::DT_SOFTWARE, core::dimension2d<s32>(512, 384), 16, false, false, 0);


Code =

#include <irrlicht.h>
#include <wchar.h>
using namespace irr;
#pragma comment(lib, "Irrlicht.lib")
scene::ICameraSceneNode* camera = 0;

class MyEventReceiver : public IEventReceiver
{
public:
virtual bool OnEvent(SEvent event)
{
if (camera)
return camera->OnEvent(event);

return false;
}
};

int main()
{
MyEventReceiver receiver;
IrrlichtDevice *device = createDevice(video::DT_DIRECTX8 , core::dimension2d<s32>(640, 480), 16, false, false, &receiver); // Problem here !
video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager();

device->getFileSystem()->addZipFileArchive("map-20kdm2.pk3");
scene::IAnimatedMesh* mesh = smgr->getMesh("20kdm2.bsp");
scene::ISceneNode* node = 0;

if (mesh)
node = smgr->addOctTreeSceneNode(mesh->getMesh(0));
if (node)
node->setPosition(core::vector3df(-1300,-144,-1249));

camera = smgr->addCameraSceneNodeFPS();
device->getCursorControl()->setVisible(false);

int lastFPS = -1;

while(device->run())
{
driver->beginScene(true, true, video::SColor(0,100,100,100));
smgr->drawAll();
driver->endScene();
int fps = driver->getFPS();
if (lastFPS != fps)
{
wchar_t tmp[1024];
swprintf(tmp, 1024, L"Quake 3 Map Example - Irrlicht Engine (fps:%d) Triangles:%d", fps, driver->getPrimitiveCountDrawn());
device->setWindowCaption(tmp);
lastFPS = fps;
}
}

device->drop();
return 0;
}


thank you.
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

you are trying to compile one of the demos distributed with 0.4.1 with the 0.4.2 version of the library.

fortunately the change was very small: simply rename DT_DIRECTX8 to EDT_DIRECTX8
a screen cap is worth 0x100000 DWORDS
Epsilon
Posts: 38
Joined: Fri Jan 09, 2004 1:46 pm
Location: Argentina

Post by Epsilon »

thank you

now i have new errors:


[Linker error] undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
[Linker error] undefined reference to `__cxa_pure_virtual'
[Linker error] undefined reference to `vtable for __cxxabiv1::__class_type_info'
D:\JuegosDevel\Example2\Makefile.win [Build Error] [example2.exe] Error 1
Post Reply