QT Creator - Ignore Includes
Hey,
I love QT Creator, best IDE ever, I have no idea why anybody would NOT use this for all their C/C++ needs. I've used QT Creator for quite awhile now and like to think I know it pretty good. Though recently, I ran into a problem where QT Creator is having trouble.
The problem is that I need it to resolve symbols that it knows are there, but aren't necessarily "included" in the file.
For example, if I have a file, file A, and there's a function, func1, which resides in file B, then I need to be able to call it in file A without it saying it can't resolve it. It resolves it fine if I include file B in file A, so it definitely parsed it.
The problem is that I am unable to modify the include statements, and I'm obviously using compilation outside of QT...so I need it to like...ignore what's in the include statements and search for the symbol globally, if that makes any sense. Unfortunately not all the includes are there, like they should be, but the project still compiles. I wish I was able to add the necessary includes, but I am not allowed to :(.
Can anybody help me here?
Yes, I realize this is a weird request, but sometimes you have all the control, sometimes you have none :-\.
TIA :).
Re: QT Creator - Ignore Includes
A extern func1 in file A can be used instead including file B, see if this fits your needs:)
Re: QT Creator - Ignore Includes
Quote:
Originally Posted by
Santosh Reddy
A extern func1 in file A can be used instead including file B, see if this fits your needs:)
Not quite. I'm not in need of a C/C++ mechanism to do so, I'm in need of QT Creator acting "as if" I've included file B into file A.
Sometimes you are only allowed to change a small piece of a file (sometimes you have control over all the files...sometimes you don't). The problem I'm running into is that QT Creator won't resolve the symbol in file A because file B isn't included into file A - though they're linked somehow, probably by way of extern, possibly by way of compiler magic - but there's a different build mechanism which takes care of the compilation & linking, I am only using QT Creator for the editing.
Hope that clears things up a bit. I basically need to ask QT Creator if it can resolve the symbol based on what's in the .includes file, regardless of whether or not the includes are explicitly listed as preprocessor directives in the files.
The problem is I'm just getting a bunch of "I have no idea what this is" from QT Creator, but then as soon as I include the file, it's okay. Though I can't leave the file modified and I like the ability to jump to symbols' definitions.
Re: QT Creator - Ignore Includes
*bump
Anybody? I can't be the first person to run into this problem..