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
entries
tab, selecting correct language underlanguages
? each language has own set of entries.in
providers
tab,cdt user setting entries
(assuming that's 1 you're adding entries to),use global provider shared between projects
unchecked? 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 include
dialog specifying include fileproject path
orworkspace path
, try usingfilesystem path
instead, 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
providers
tab, selectbuilt-in compiler settings
provider. - be sure
use global provider shared between projects
unchecked - append
-include <path>
or whatever other flagcommand compiler specs
.
Comments
Post a Comment