Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Can't configure Indexer to recognize "forced-included" files (/fi parameter)
Can't configure Indexer to recognize "forced-included" files (/fi parameter) [message #1059622] Mon, 20 May 2013 21:06 Go to next message
Mauro Faccenda is currently offline Mauro FaccendaFriend
Messages: 3
Registered: May 2013
Junior Member
Hi all,

I am using Eclipse Indigo with Visual Studio 2012, and the code I am working on creates a header file (with tons of macro denifitions) that is included into every other file by using the force include parameter (/FI).

I was able to successfully configure the build parameters, by adding the parameter "/FI<filename.h>" on Project Properties->C/C++ Build->Settings->C Compiler (cl)->Miscellaneous.

But it seems the Indexer can't find the macros on the (previously) automatically created file. As a result, Eclipse shows tons of syntax error and non resolved types/symbols, but I am able to build the executable.

So, I was wondering if there is any way to specify this include so the Indexer recognizes the macros on it.


Thanks in advance,

UPDATE:
I am actually using Eclipse Juno, but tried also with Indigo.

[Updated on: Tue, 21 May 2013 14:53]

Report message to a moderator

Re: Can't configure Indexer to recognize "forced-included" files (/fi parameter) [message #1059907 is a reply to message #1059622] Wed, 22 May 2013 07:17 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
1) Open Windows->Preferences and go to C/C++->Property Pages Settings
2) Enable "Display Include Files on Paths and Symbols page
3) Open project properties and got to C/C++ General->Paths and Symbols
4) select tab Include Files
5) click Add button to add your header file filename.h (depending on your language you must add it for C and C++)


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Can't configure Indexer to recognize "forced-included" files (/fi parameter) [message #1060006 is a reply to message #1059907] Wed, 22 May 2013 14:09 Go to previous messageGo to next message
Mauro Faccenda is currently offline Mauro FaccendaFriend
Messages: 3
Registered: May 2013
Junior Member
Hi Axel,

First, thank you for your help.

But I couldn't find the "Include Files" tab you mentioned, either on Indigo or Juno.

As you can see on these screenshots:

index.php/fa/15013/0/

index.php/fa/15014/0/

Is there anything else I can do to enable it?
Re: Can't configure Indexer to recognize "forced-included" files (/fi parameter) [message #1060143 is a reply to message #1060006] Thu, 23 May 2013 09:50 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
That's strange. It works for me on Juno. Did you try to close/reopen the project, restart Eclipse?

Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Can't configure Indexer to recognize "forced-included" files (/fi parameter) [message #1061009 is a reply to message #1060143] Wed, 29 May 2013 13:44 Go to previous messageGo to next message
Andrew Gvozdev is currently offline Andrew GvozdevFriend
Messages: 257
Registered: July 2009
Senior Member
Try "Preprocessor Include Paths..." property page. Select your language and "CDT User Setting Entries" provider. Hit "Add", there is a dropbox initially showing "Include Directory". Select "Include File" instead.
Re: Can't configure Indexer to recognize "forced-included" files (/fi parameter) [message #1061017 is a reply to message #1061009] Wed, 29 May 2013 14:12 Go to previous messageGo to next message
Mauro Faccenda is currently offline Mauro FaccendaFriend
Messages: 3
Registered: May 2013
Junior Member
Thank you Andrew,

That seems to do the trick.

Another different, but related, question: is there any way to tell Eclipse (or its Indexer) to not consider system libraries (/X cl.exe parameter)?

I could find it for the GCC-based toolchains, but for the MSVC toolchain I couldn't.

Thanks again.
Re: Can't configure Indexer to recognize "forced-included" files (/fi parameter) [message #1444878 is a reply to message #1061009] Tue, 14 October 2014 17:40 Go to previous messageGo to next message
Andrey Sotnikov is currently offline Andrey SotnikovFriend
Messages: 23
Registered: October 2014
Junior Member
Andrew Gvozdev wrote on Wed, 29 May 2013 13:44
Try "Preprocessor Include Paths..." property page. Select your language and "CDT User Setting Entries" provider. Hit "Add", there is a dropbox initially showing "Include Directory". Select "Include File" instead.

The problem is this won't be stored inside the project settings. It will be stored in the workspace metadata: .metadata\.plugins\org.eclipse.cdt.core. Is there any chance to set forced include files in the toolchain settings in .cproject? Eclipse is so frustrating.
Re: Can't configure Indexer to recognize "forced-included" files (/fi parameter) [message #1444933 is a reply to message #1444878] Tue, 14 October 2014 19:44 Go to previous message
Andrey Sotnikov is currently offline Andrey SotnikovFriend
Messages: 23
Registered: October 2014
Junior Member
Ok, I figured this out. It is in .cproject in <option id="gnu.cpp.compiler.option.include.files.517432834" name="Include files (-include)" superClass="gnu.cpp.compiler.option.include.files" valueType="includeFiles">.
Previous Topic:Default build behaviour when Cygwin is in PATH
Next Topic:Unable to get Kepler working with c++11
Goto Forum:
  


Current Time: Tue Sep 24 16:01:54 GMT 2024

Powered by FUDForum. Page generated in 0.04128 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top