I just test a sample code below:
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");
}
and it works here.
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:
#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");
}
I have download the full Ogre mingw sdk and the tinyOgre sample.
I just create a console project, and put the source of tinyOgre there, and setting the compiler search path.
and "Find declaration of" works.
the batch parsing seems works fine:
Project 'Ogre' parsing stage done (306 total parsed files, 37200 tokens in 0 minute(s), 3.781 seconds).
So, you need to give use a step by step to produce your bug.
thanks you.
I've tried again now with a fresh copy of the latest nightly CB and the ogre mingw sdk.
Extracted all archives on D:\, respectively.
Started CB, created a new C++ console project on D:\ called test.
Removed main.cpp from the project.
Added the TinyOgre files to project, recursively.
Right-clicked on the project test -> Build options -> Selected test (instead of Debug) on the left panel -> Search directories -> Compiler -> Clicked the Add button -> I've put in D:\OgreSDK_mingw_v1-7-2\include\OGRE -> OK -> OK
At this point I've tried the "Find Declaration of", CC and "Open #include file" features, all of which do not work. Their respective errors are: "Not found", "The Parser is still parsing files" and "Not found".
I should note that the same occurs on the original main.cpp:
#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!" << endl;
return 0;
}
I think I've found a bug of some sort.
The CC works fine as long as I don't change the GCC toolchain settings! Once I change them and restart CB, CC doesn't work anymore. The funny thing is that until I restart CB, it will work fine... I just can't exit CB again, or I'll have to remove the default.conf and set everything up again, to get it to work.
I've compared the working and not working default.confs:
working:
<MASTER_PATH>
<str>
<![CDATA[D:\TDM-MinGW]]>
</str>
</MASTER_PATH>
NOTE: there are no C_COMPILER,etc. tags present here
not working (after I've changed the toolchain settings and restarted CB):
<MASTER_PATH>
<str>
<![CDATA[D:\TDM-MinGW-dw2]]>
</str>
</MASTER_PATH>
<C_COMPILER>
<str>
<![CDATA[mingw32-gcc-dw2.exe]]>
</str>
</C_COMPILER>
<CPP_COMPILER>
<str>
<![CDATA[mingw32-g++-dw2.exe]]>
</str>
</CPP_COMPILER>
<LINKER>
<str>
<![CDATA[mingw32-g++-dw2.exe]]>
</str>
</LINKER>
I've also noticed that when CC works I get this in the Code::Blocks tab:
Opening D:\test_OGRE\cb2\cb2.cbp
done
Create new parser for project 'cb2'
Project 'cb2' parsing stage done!
vs. not working:
Opening D:\test_OGRE\cb2\cb2.cbp
done