ide - Adding a "preprocessor include" doesn't seem to have effect -
i want ecplise cdt parser pre-include file not specified in source file, reasons won't go into, not complain undeclared identifiers in various places.
i tried using project | properties | c/c++ general | preprocesor includes | entries , adding relevant file languages. however, doesn't seem have effect. if go paths , symbols | includes, can add include directories, not include files.
what doing wrong , how can c/c++ parser include file?
note: i'm using nvidia cuda 8.0's nsight, modified cuda-enabled eclipse; platform version 4.4.0.
as noticed, paths , symbols | includes supports include directories, preprocessor include paths, macros etc. way go.
some common pitfalls may running into:
in
entriestab, selecting correct language underlanguages? each language has own set of entries.in
providerstab,cdt user setting entries(assuming that's 1 you're adding entries to),use global provider shared between projectsunchecked? if it's checked, project-specific entries ignored.have rebuilt project's index (
project -> c/c++ index -> rebuild)? new settings typically not picked until rebuild of index.
other things may help:
if, in
add includedialog specifying include fileproject pathorworkspace path, try usingfilesystem pathinstead, if file inside project or workspace. helps.in same dialog, try checking
treat built-in. i'm not sure include files, has helped me in past include directories.
finally, if none of works, there more direct way specify -include or other flag:
- in
providerstab, selectbuilt-in compiler settingsprovider. - be sure
use global provider shared between projectsunchecked - append
-include <path>or whatever other flagcommand compiler specs.
Comments
Post a Comment