Don't compiling...
Posted: Sun Nov 09, 2008 12:48 pm
Hi to all. My simple code:
I compiling this code in Dev-C++ and I does not got the good result...
Problem(written in the Errors Block):
What problem I have?
Code: Select all
#include <irrlicht.h>
using namespace irr;
#pragma comment(lib, "Irrlicht.lib")
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
int main()
{
IrrlichtDevice *device =
createDevice(EDT_OPENGL, dimension2d<s32>(1024, 580), 16, false, false, false, 0);
if (device == 0)
return 1;
device->setWindowCaption(L"GoD forever! | Our games the games of games! | Да, да! Мы крутые!+))");
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* scene = device->getSceneManager();
device->getFileSystem()->addZipFileArchive("C:/Documents and Settings/Neo/Рабочий стол/gently caress.zip");
IAnimatedMesh* mesh = smgr->getMesh("map(1,2).b3d");
ISceneNode* node = 0;
if (mesh)
node = scene->addOctTreeSceneNode(mesh->getMesh(0));
scene->addSkyBoxSceneNode(
driver->getTexture("C:/Documents and Settings/Neo/Рабочий стол/Кидай/irrlicht-1.4.2/irrlicht-1.4.2/media/irrlicht2_up.jpg"),
driver->getTexture("C:/Documents and Settings/Neo/Рабочий стол/Кидай/irrlicht-1.4.2/irrlicht-1.4.2/media/irrlicht2_dn.jpg"),
driver->getTexture("C:/Documents and Settings/Neo/Рабочий стол/Кидай/irrlicht-1.4.2/irrlicht-1.4.2/media/media/irrlicht2_lf.jpg"),
driver->getTexture("C:/Documents and Settings/Neo/Рабочий стол/Кидай/irrlicht-1.4.2/irrlicht-1.4.2/media/media/irrlicht2_rt.jpg"),
driver->getTexture("C:/Documents and Settings/Neo/Рабочий стол/Кидай/irrlicht-1.4.2/irrlicht-1.4.2/media/media/irrlicht2_ft.jpg"),
driver->getTexture("C:/Documents and Settings/Neo/Рабочий стол/Кидай/irrlicht-1.4.2/irrlicht-1.4.2/media/media/irrlicht2_bk.jpg"));
ITriangleSelector* selector = 0;
if (node)
{
node->setPosition(vector3df(0,-1,0));
selector = scene->createOctTreeTriangleSelector(mesh->getMesh(0), node, 128);
node->setTriangleSelector(selector);
}
cam->setPosition(core::vector3df(42,115,11));
cam->setTarget(core::vector3df(0,0,0));
if (selector)
{
ISceneNodeAnimator* anim = scene->createCollisionResponseAnimator(
selector, cam, vector3df(30,50,30), vector3df(0,-3,0), vector3df(0,50,0));
selector->drop();
cam->addAnimator(anim);
anim->drop();
}
device->getCursorControl()->setVisible(false);
scene->addLightSceneNode(0, vector3df(-60,100,400), SColorf(1.0f,1.0f,1.0f,1.0f), 600.0f);
int lastFPS = -1;
while(device->run())
if (device->isWindowActive())
{
driver->beginScene(true, true, 0);
scene->drawAll();
line3d<f32> line;
line.start = cam->getPosition();
line.end = line.start + (cam->getTarget() - line.start).normalize() * 1000.0f;
vector3df intersection;
triangle3df tri;
if (scene->getSceneCollisionManager()->getCollisionPoint(
line, selector, intersection, tri))
{
driver->setTransform(ETS_WORLD, matrix4());
driver->draw3DTriangle(tri, SColor(0,255,0,0));
}
driver->endScene();
int fps = driver->getFPS();
if (lastFPS != fps)
{
stringw str = L"Да вот специально не напишу тут ничего!+) [";
str += driver->getName();
str += "] FPS:";
str += fps;
device->setWindowCaption(str.c_str());
lastFPS = fps;
}
}
device->drop();
return 0;
}
Problem(written in the Errors Block):
All right, I had been the bad include the "include files" in the options of my projects. But I have the other project with analog code. When compiling it, all good. When I compiling THIS code in one, I got this text in "Errors block":irrlicht.h: No such file or directory.
Code: Select all
Illegal byte sequence
[Build Error] [obj/main.o] Error 1