I would like to specify to the GCC C++ Compiler the following directive:
g++ -DPRODUCT=\"HFTLibrary.h\"
I can set this in the "Command" field of the Project Properties and works fine.
But I cannot set it as a Symbol: Name=PRODUCT Value=\\"HFTLibrary.h\\"
The final " character is deleted after I press OK
C/C++ Build->Settings
Tool settings
and look up your compiler (ie GCC C++ Compiler) Preprocessor
Add
and enter your symbol ... hmmmm... After testing this with my eclipse version Version: Mars Release (4.5.0) Build id: 20150621-1200
it seems there is a bug. It works for normal defines, but not when you try to define a string this way. If you don't put the quotes, then the define is added, but of course can not be used as a string in your code, and if you put the quotes it simply wraps the whole -D...
in quotes which is wrong.
Anyway, setting it in the Path and Symbol
property will not affect your Build, because this is only to tell where eclilpse can find includes and symbols for the indexer. For the build to be affected you must change it in the way as I described above.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.