Page 1 of 1

stray \160

Posted: Mon Jun 12, 2006 12:12 am
by Dulaithol
So, me and compiling, well, where not getting along... Me and my friend are learning how to program programs for irrlicht. Hes getting on just fine, me on the other hand. I have Devcpp set up right, for what I know. When I try and compile a little hello world program he wote Im getting a "stary '\160' in program" starting on line 14

Code: Select all

#include "irrlicht.h"

// Irrlicht Namespaces
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;


int main()
{
  IrrlichtDevice *irrDevice = createDevice(EDT_SOFTWARE,  [b]//This line[/b]
                                        dimension2d<s32>(512, 384),
                                        16,
                                        false,
                                        false,
                                        0);
                                        
  irrDevice->setWindowCaption(L"Dev-C++ and the Irrlicht Engine!");
  
  IVideoDriver* irrDriver = irrDevice->getVideoDriver();
  ISceneManager* irrSceneMgr = irrDevice->getSceneManager();
  IGUIEnvironment* irrGUIEnv = irrDevice->getGUIEnvironment();

  irrGUIEnv->addStaticText(
          L"Hello World! This is the Irrlicht software engine!",
           rect<int>(10,10,200,30), true, true, 0, -1);
  
  while(irrDevice->run())
  { 
      irrDriver->beginScene(true, true, SColor(0,192,192,192));
              
              irrSceneMgr->drawAll();
              irrGUIEnv->drawAll();
              
       irrDriver->endScene();
   }

  irrDevice->drop();

  return(0);
}

Posted: Mon Jun 12, 2006 12:55 am
by Acki
Hmm, there is one bool missing (VSync)...

Code: Select all

IrrlichtDevice *irrDevice = createDevice(EDT_SOFTWARE,
                                        dimension2d<s32>(512, 384),
                                        16,
                                        false,
                                        false,
                                        false,
                                        0);
Or for testing try it without parameters (defaults will be used):

Code: Select all

IrrlichtDevice *irrDevice = createDevice();
Or try createDeviceEx(...) (have a look at the examples and for SIrrlichtCreationParameters)...

Posted: Mon Jun 12, 2006 1:21 am
by Dulaithol
Thanks for the reply, but realy happend was i didnt have the right path.... Thanks again.