Page 1 of 1

What the... ISceneManager undeclared?!

Posted: Mon Nov 27, 2006 1:43 pm
by Lee Zhi Eng
after a few months i didn't touch irrlicht, i'd forgot most of the things lol
so i try to refresh back what i'd learned about irrlicht.

i opened dev-c++ 4.9.9.2, and started to write codes which are similar to irrlicht hello world tutorial. but when i tried to compile... i got this error:
In function `int main()':
`ISceneManager' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function it appears in.)
`smgr' undeclared (first use this function)
`IGUIEnvironment' undeclared (first use this function)
`guienv' undeclared (first use this function)
[Build Error] [main.o] Error 1
these 2 lines... obviously no error? i'd checked a few times, by referring to the hello world tutorial.

Code: Select all

ISceneManager* smgr = device->getSceneManager();
IGUIEnvironment* guienv = device->getGUIEnvironment();
the project is linked to the lib and include folder.
and at the top of my script, i had included the header file
#include <irrlicht.h>

i have no idea what is going wrong.
i remember few months ago it worked.

Posted: Mon Nov 27, 2006 1:49 pm
by JP
Are you using the namespaces? If not you have to stick irr::scene:: in front of ISceneManager, and similarly for other things.

Posted: Mon Nov 27, 2006 2:02 pm
by Lee Zhi Eng
i got these at the top

using namespace irr;
using namespace video;
using namespace core;
using namespace scene;

still not working :(

Posted: Mon Nov 27, 2006 4:39 pm
by varnie
hmm, i'm using dev cpp too, and i don't have such errors. check once again your code.

Posted: Mon Nov 27, 2006 5:09 pm
by JP
Try checking the hello world tutorial and seeing if you've missed anything and also see if the hello world tutorial will compile.

Posted: Tue Nov 28, 2006 3:52 am
by Lee Zhi Eng
*sweat*
i forgot using namespace gui; :oops:
thanks anyway :P

Posted: Tue Nov 28, 2006 10:46 am
by JP
ISceneManager should have been fine then :?