I am having some difficulty setting up my environment and testing the hello world application.
Windows 7 x64
Eclipse Juno release with CDT installed
MSVC 7.1 SDK installed
Eclipse is setup as follows
Tool Settings -> C++ Compiler -> Preprocessor -> Include Path -> "C:\irrlicht-1.7.3\include"
Tool Settings -> Linker -> Libraries -> Libraries -> "C:\irrlicht-1.7.3\lib\Win32-visualstudio\Irrlicht.lib"
Now I currently have the starting 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;
int main()
{
IrrlichtDevice *device = createDevice( video::EDT_OPENGL, dimension2d<u32>(800, 600), 16,
false, false, false, 0);
// IrrlichtDevice *device = createDevice(video::EDT_OPENGL,
// core::dimension2d<irr::u32>(640,480));
if (!device)
return 1;
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* sceneManager = device->getSceneManager();
IGUIEnvironment* guiEnvironment = device->getGUIEnvironment();
sceneManager->addCameraSceneNode();
while(device->run())
{
driver->beginScene(true, true, SColor(255,50,130,50));
sceneManager->drawAll();
guiEnvironment->drawAll();
driver->endScene();
}
device->drop();
return 0;
}
Invalid arguments //This is for createDevice
Invalid template arguments // this is for dimension2d
Type 'u32' could not be resolved //this is for u32 inside of dimension2d
I am only concerned with u32 not resolving.
I have checked all i can think of and can see u32 is declared in file irrTypes.h for the namespace irr.
Now namespace irr appears to be fine as i can use s32 which is also declared in the same file irrTypes
From irrTypes.h
Code: Select all
//! 32 bit unsigned variable.
/** This is a typedef for unsigned int, it ensures portability of the engine. */
#ifdef _MSC_VER
typedef unsigned __int32 u32;
#else
typedef unsigned int u32;
#endif
//! 32 bit signed variable.
/** This is a typedef for signed int, it ensures portability of the engine. */
#ifdef _MSC_VER
typedef __int32 s32;
#else
typedef signed int s32;
#endif
I've followed the setup tutorials and API but still having the same issue with no solution found.
Does anyone know where I've gone wrong or what I have forgotten to include?