i can create my main.exe but when it runs nothing happens.
i dont even get errors.
can anyone help me figure out whats going on?
even if it is just to have the compiler tell me why its not loading would be awesome.
thanks a bunch
here is my main.cpp file
Code: Select all
#include <irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
int main()
{
irr::IrrlichtDevice *device =
createDevice( video::EDT_SOFTWARE, dimension2d<u32>(640, 480), 16,
false, false, false, 0);
if (!device)
return 1;
device->setWindowCaption(L"Hello World! - Irrlicht Engine Demo");
irr::video::IVideoDriver* driver = device->getVideoDriver();
irr::scene::ISceneManager* smgr = device->getSceneManager();
irr::gui::IGUIEnvironment* guienv = device->getGUIEnvironment();
guienv->addStaticText(L"Hello World! This is the Irrlicht Software renderer!",
rect<s32>(10,10,260,22), true);
irr::scene::IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2");
if (!mesh)
{
device->drop();
return 1;
}
irr::scene::IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
if (node)
{
node->setMaterialFlag(EMF_LIGHTING, false);
node->setMD2Animation(scene::EMAT_STAND);
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(255,100,101,140));
smgr->drawAll();
guienv->drawAll();
driver->endScene();
}
device->drop();
return 0;
}
Code: Select all
cls
@echo off
g++ -c main.cpp -o main.exe -L C:\Users\alex\Desktop\irrlicht-1.8.1\irrlicht-1.8.1\lib\Win32-gcc -l C:\Users\alex\Desktop\irrlicht-1.8.1\irrlicht-1.8.1\lib\Win32-gcc\libIrrlicht.a -I C:\Users\alex\Desktop\irrlicht-1.8.1\irrlicht-1.8.1\include
pause
main
pause
compile+run.bat