Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsIndexer's extern "C" confusion
https://www.eclipse.org/forums/index.php/mv/msg/1091976/1782683/#msg_1782683
Vladimir Grishchenko2018-02-27T20:40:21-00:00Re: Indexer's extern "C" confusion
https://www.eclipse.org/forums/index.php/mv/msg/1091976/1782743/#msg_1782743
Open Project Properties -> C/C++ General -> Paths and Symbols, pick the #Symbols tab and add symbol __cplusplus and value 1.]]>Tauno Voipio2018-02-28T20:37:10-00:00Re: Indexer's extern "C" confusion
https://www.eclipse.org/forums/index.php/mv/msg/1091976/1782745/#msg_1782745
Vladimir Grishchenko2018-02-28T20:52:15-00:00Re: Indexer's extern "C" confusion
https://www.eclipse.org/forums/index.php/mv/msg/1091976/1782752/#msg_1782752
Project --> Properties --> C/C++ General --> Preprocessor Include Paths, Macros etc. are defined by language.
So are the settings for Paths and Symbols
In Project --> Properties --> C/C++ General --> Preprocessor Include Paths, Macros etc.
Define a User Entry for C++ as __cplusplus (Note the double underscore)
The compiler should also set this and it should appear among the entries for the built-ins.
Maybe your compiler built-ins provider doesn't have it (e.g., Visual C/C++ doesn't have a way to list bult-ins)
Setting it as a User Entry should fix that.
Alternately, defining it in Paths and Symbols should work too.
MinGW GCC Built-ins
Note that __cplusplus is defined as 199711L by MinGW GCC
Adding a macro definition
Be sure to select the proper configuration name when you do this.
]]>David Vavra2018-03-01T03:41:30-00:00Re: Indexer's extern "C" confusion
https://www.eclipse.org/forums/index.php/mv/msg/1091976/1782754/#msg_1782754
Vladimir Grishchenko2018-03-01T04:23:09-00:00Re: Indexer's extern "C" confusion
https://www.eclipse.org/forums/index.php/mv/msg/1091976/1782759/#msg_1782759
The built-ins provider is the one to fill in predefined macros.
Since you don't have one, you need to do it manually.
What you might want to consider is a file that contains the definitions and add it as a user entry in Project --> Properties --> C/C++ General --> Preprocessor Include Paths, Macros etc.
You might want to file an enhancement request in Bugzilla to have built-in defaults for standard macros.
]]>David Vavra2018-03-01T06:14:20-00:00Re: Indexer's extern "C" confusion
https://www.eclipse.org/forums/index.php/mv/msg/1091976/1782773/#msg_1782773
I pushed the GCC to create a header file of the includes:
Many of the standard library headers depend on the constants in the predefinition file, and this keeps the indexer happy with them.
]]>Tauno Voipio2018-03-01T09:17:12-00:00