In the ide, it gets up to "device->run()"
Just normal exe running it gets to start scene
The program crashes with "Program has stopped working. Windows is trying to find a solution to this program".
Code: Select all
#include <iostream>
#include <irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
int main(){
IrrlichtDevice *device =createDevice(EDT_OPENGL, dimension2d<u32>(512, 384), 16,
false, false, false, 0);
if (!device)
return 0;
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
IGUIEnvironment* guienv = device->getGUIEnvironment();
if (!driver)
return 0;
if (!smgr)
return 0;
if (!guienv)
return 0;
device->setWindowCaption(L"Title to set");
while(device->run())
{
driver->beginScene(true, true, SColor(255,100,101,140));
smgr->drawAll();
guienv->drawAll();
driver->endScene();
}
device->drop();
return 0;
}
"Linker Settings" Added a link to irrlicht.lib
"Search Directories" Added "include" and the folder .lib is in to each of the sub-sections
I have copied "irrlicht.dll" to the run directory.