Author Topic: Code completion with Ogre3D  (Read 4091 times)

anji

  • Guest
Code completion with Ogre3D
« on: January 18, 2008, 01:45:27 am »
Hello,

I'm having trouble getting C::B to code-complete my Ogre3D SDK includes.

I am using the latest C::B build (4830). I had the same problems using (4801).

My project is a simple. Created using the Ogre project wizard in C::B. I filled main.cpp with the contents of one of the Ogre tutorials.

I have an OGRE_HOME environment variable pointing to the SDK at C:\OgreSDK
I'm using MingW to compile, and I'm including:
  • ${OGRE_HOME}\includes
  • ${OGRE_HOME}\samples\includes
  • ${OGRE_HOME}\refapp\includes

I've tried adding these paths to the "C/C++ Parser Options" tab. This didn't help (I've re-opened the project and tried re-parsing it). I've also tried to use absolute paths everywhere instead of ${OGRE_HOME}. This didn't help either.

My symptoms:
I can consistently code-complete anything in my own project. Which means everything inside of main.cpp.
"Find declaration of X" on a class name works fine. C::B recognizes it and shows me in which Ogre header it's declared.
The Ogre symbols do not show up in the Symbols browser.

The project compiles and runs fine.

Am I doing something wrong, or is this a bug?

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: Code completion with Ogre3D
« Reply #1 on: January 18, 2008, 07:46:19 am »
Hi !

Maybe a bug.
Open the symbol tab, right click on root and click on reparse now... It may work.

Dje

anji

  • Guest
Re: Code completion with Ogre3D
« Reply #2 on: January 18, 2008, 11:12:00 am »
Hi. Thanks for the reply.

Yes I've tried re-parsing. It takes long enough (about 5 seconds on my reasonably fast PC) to make me suspect it does try to parse the Ogre headers. But it still only shows me the symbols in my project.

christian

  • Guest
Re: Code completion with Ogre3D
« Reply #3 on: January 20, 2008, 03:33:47 pm »
I am having the very same problem here using Codeblocks svn 4835 compiled with-all-plugins=all on a ubuntu 7.10. Code completion only seems to work on main files of the project and doesn't take in accounts external includes.

Whether it's absolute or relative path to Ogre headers that I put on C/C++ Parser Options additional search paths list, re-opening the project and using the "re-parse now" function on the root of the symbol list doesn't have any effect.

Maybe it's a bug of the code completion plugin, because, in the main editor, when right-clicking on a Ogre class and using "Find declaration of", C::B is able to open the right file..

(Edit: Of course, I have Follow Local and Global checked in code-completion configuration, that's why i'm thinking it may be a bug)
« Last Edit: January 20, 2008, 04:00:59 pm by christian »