User forums > Help
Issues with "Find Declaration of" and Code Completion.
jonas thomas:
I've been working my way through some Ogre Tutorials http://www.ogre3d.org/tikiwiki/Intermediate+Tutorial+1&structure=Tutorials#Animation
and I'm having some annoying issues with Code Completion when I try to hack up the code.
Basically
--- Quote ---class BaseApplication : public Ogre::FrameListener, public Ogre::WindowEventListener, public OIS::KeyListener, public OIS::MouseListener, OgreBites::SdkTrayListener
{
......
protected:
Ogre::SceneManager* mSceneMgr;
......
}
--- End quote ---
--- Quote ---class ITutorial01 : public BaseApplication
{
public:
ITutorial01(void);
virtual ~ITutorial01(void);
protected:
virtual void createScene(void);
virtual void createFrameListener(void);
virtual bool nextLocation(void);
virtual bool frameRenderingQueued(const Ogre::FrameEvent &evt);
}
--- End quote ---
class ITutorial01 : public BaseApplication
{
public:
ITutorial01(void);
virtual ~ITutorial01(void);
protected:
virtual void createScene(void);
......
}
--- Quote ---void ITutorial01::createScene(void)
{
Ogre::SceneManager *Testthis;
*Testthis->getEntity("code completion works here");
// Set the default lighting.
mSceneMgr->setAmbientLight(Ogre::ColourValue(1.0f, 1.0f, 1.0f));
// Create the entity
mEntity = mSceneMgr->createEntity("Robot", "robot.mesh");
--- End quote ---
Code completion works the pointer Testthis but doesn't work on mSceneMgr
If I try doing a find declaration of mSceneMgr it can't find it, even though it's in the project and everything compiles and runs properly.
I must be missing something obvious here..
Anyone?
jonas thomas:
I must have screwed something up here. I found something here back in 2007 http://forums.codeblocks.org/index.php?action=printpage;topic=7241.0
that talked about
--- Quote ---I select the Symbols tab of the Management notebook
I right click on the Symbols item of the tree (root)
I click on re-parse now
This force the projects to be reparsed and the find items work again.
--- End quote ---
Err... Does that still apply in 2011?
ollydbg:
I just test a sample code below:
--- Code: ---class BaseApplication : public Ogre::FrameListener, public Ogre::WindowEventListener, public OIS::KeyListener, public OIS::MouseListener, OgreBites::SdkTrayListener
{
protected:
Ogre::SceneManager* mSceneMgr;
};
class ITutorial01 : public BaseApplication
{
public:
ITutorial01(void);
virtual ~ITutorial01(void);
protected:
virtual void createScene(void);
virtual void createFrameListener(void);
virtual bool nextLocation(void);
virtual bool frameRenderingQueued(const Ogre::FrameEvent &evt);
};
void ITutorial01::createScene(void)
{
Ogre::SceneManager *Testthis;
*Testthis->getEntity("code completion works here");
// Set the default lighting.
mSceneMgr->setAmbientLight(Ogre::ColourValue(1.0f, 1.0f, 1.0f));
// Create the entity
mEntity = mSceneMgr->createEntity("Robot", "robot.mesh");
}
--- End code ---
and it works here.
jonas thomas:
Most curious, that's not what I get when I created a new single file project.
I created a new ogre project using the single file below and was able to build.
Testthis
mSceneMgr
Now code completion is not working on either one nor is find declaration.
The thing is if I type:
Ogre::
, I get code completion to work on that.
I'm using SVN 7174 Build 28 May Wx 2.8.10 (Linux Unicode) 32 bit.
Am I missing something obvious here? (It seems like there is not a lot of noise when I google this, so I'm thinking it's me. :cry:
--- Code: ---
#include <OgreCamera.h>
#include <OgreEntity.h>
#include <OgreLogManager.h>
#include <OgreRoot.h>
#include <OgreViewport.h>
#include <OgreSceneManager.h>
#include <OgreRenderWindow.h>
#include <OgreConfigFile.h>
#include <OISEvents.h>
#include <OISInputManager.h>
#include <OISKeyboard.h>
#include <OISMouse.h>
#include <SdkTrays.h>
#include <SdkCameraMan.h>
class BaseApplication : public Ogre::FrameListener, public Ogre::WindowEventListener, public OIS::KeyListener, public OIS::MouseListener, OgreBites::SdkTrayListener
{
protected:
Ogre::SceneManager* mSceneMgr;
Ogre::Entity *mEntity;
};
class ITutorial01 : public BaseApplication
{
public:
ITutorial01(void);
virtual ~ITutorial01(void);
protected:
virtual void createScene(void);
virtual void createFrameListener(void);
virtual bool nextLocation(void);
virtual bool frameRenderingQueued(const Ogre::FrameEvent &evt);
};
void ITutorial01::createScene(void)
{
Ogre::SceneManager *Testthis;
Testthis->getEntity("code completion works here");
// Set the default lighting.
mSceneMgr->setAmbientLight(Ogre::ColourValue(1.0f, 1.0f, 1.0f));
// Create the entity
mEntity = mSceneMgr->createEntity("Robot", "robot.mesh");
}
--- End code ---
ollydbg:
--- Quote from: jonas thomas on June 05, 2011, 07:16:35 am ---Most curious, that's not what I get when I created a new single file project.
I created a new ogre project using the single file below and was able to build.
Testthis
mSceneMgr
Now code completion is not working on either one nor is find declaration.
--- End quote ---
Is it simple or complex to test the Ogre library???
If it is simple, I can test this file for you. :D
Navigation
[0] Message Index
[#] Next page
Go to full version