u32 could not be resolved

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
Edward
Posts: 1
Joined: Sat Sep 22, 2012 3:16 am

u32 could not be resolved

Post by Edward »

Hi All

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;
 
}
 
Now I am getting the following errors
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 reinstalled eclipse as well thinking that was the issue but same result. I don't know where else to check or why its failing to use u32 from everything I can see there isn't any reason that is stopping it.

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?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: u32 could not be resolved

Post by hybrid »

Please include the whole error message, and not just your interpretation of it. I'd assume that you have some old include files in your path, which still require s32 dimensions in createDevice, and thus failing. Or vice versa, this bug in your actual code.
Post Reply