Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354692

Summary: Some macros cannot be resolved
Product: [Tools] CDT Reporter: Richard Eames <eclipse>
Component: cdt-parserAssignee: CDT Codan Inbox <cdt-codan-inbox>
Status: RESOLVED WORKSFORME QA Contact: Elena Laskavaia <elaskavaia.cdt>
Severity: normal    
Priority: P3 CC: cdtdoug, kosashi, yevshif, zeratul976
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Richard Eames CLA 2011-08-13 15:10:07 EDT
Build Identifier:  I20110613-1736

I've been tinkering with python's internals this past week, and I've been having trouble trying to get eclipse to recognise all the macros defined. I've tried defining some of them in project > properties > C++ General > Paths and Symbols > Symbols. This seems to work for a few seconds, then eclipse again decides the macros cannot be resolved, despite being able to CTRL+click on them and got to the definition.

I haven't yet been able to write a test case for this as I don't know where exactly the problem lies; but my project setup is thus:
- Python 2.7 source extracted to a folder.
- New C project under eclipse pointed to the Python source.
- Added include paths from the Python source to project settings.

The most common macros I'm trying to remove the errors for are the reference count ones: Py_INCREF, Py_DECREF.

Reproducible: Always
Comment 1 Tomasz Wesolowski CLA 2011-08-17 13:47:16 EDT
This is a parser problem.

It would be great if you could try to isolate the issue into a minimal project, so that we could create a test case for the parser.
Comment 2 Nathan Ridge CLA 2017-01-10 02:25:30 EST
If you're still seeing this, please feel free to reopen and provide a small testcase as requested in comment 1.