What the... ISceneManager undeclared?!

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
Lee Zhi Eng
Posts: 34
Joined: Tue Aug 22, 2006 2:48 pm
Location: Malaysia

What the... ISceneManager undeclared?!

Post 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.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Are you using the namespaces? If not you have to stick irr::scene:: in front of ISceneManager, and similarly for other things.
Image Image Image
Lee Zhi Eng
Posts: 34
Joined: Tue Aug 22, 2006 2:48 pm
Location: Malaysia

Post 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 :(
varnie
Posts: 31
Joined: Wed Jul 19, 2006 8:27 pm
Location: Russia, Ural

Post by varnie »

hmm, i'm using dev cpp too, and i don't have such errors. check once again your code.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post 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.
Image Image Image
Lee Zhi Eng
Posts: 34
Joined: Tue Aug 22, 2006 2:48 pm
Location: Malaysia

Post by Lee Zhi Eng »

*sweat*
i forgot using namespace gui; :oops:
thanks anyway :P
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

ISceneManager should have been fine then :?
Image Image Image
Post Reply