Auto-discovery of paths and symbols - 3 defects in CDT2.1RC4? [message #130094] |
Thu, 02 December 2004 13:54 |
Eclipse User |
|
|
|
Originally posted by: jon.mail.com
Hi,
I'm currently using Eclipse 3.0.1 with CDT2.1RC4, and am having a few
issues with the GNU scanner/parser that attempts to deduce include paths
and symbols from build output.
My problems have occurred in "real world" makefiles that have halted my
current CDT integration plans, but I've boiled them down to the
following minimal examples for illustration:
(1) Quotes around a source file produce warnings
Take the following output from a build:
g++ -I ..\inc -o binary.exe "..\src\source.cpp"
With warnings switched on, the scanner reports:
CDT Path Discovery is unable to determine source file name
in build command: g++ -I ..\inc -o binary.exe
"..\src\source.cpp"
(2) Valid Include paths specified in output can be ignored
If I modify the above to remove the quotes:
g++ -I ..\inc -o binary.exe ..\src\source.cpp
....then no warning is produced, but the "inc" directory isn't picked up
from the output and added to the "Includes" section of the project.
This occurs even if you "muck out" what's previously been detected by
deleting "Includes" from under "Discovered Paths" in the "Edit
Container" dialog found under "Project | Properties | C/C++ Include
Paths and Symbols".
I'm not sure if an existence check is performed, but the "inc" directory
does exist and does contain a header #include-d from source.cpp (the
source builds without issue).
(3) Macro parsing sometimes garbles the symbols
If you again modify the above example to include a macro:
g++ -D_MACRO_ -I ..\inc -o ..\binary.exe ..\src\source.cpp
....the include path is still ignored as before, but the detection of
-D_MACRO_ has also been corrupted. Checking under "Project |
Properties | C/C++ Include Paths and Symbols | Discovered Paths |
Preprocessor Symbols" there are (ignoring the intrinsic macros) two
entries for the -D_MACRO_ symbol - one correct and one that isn't:
_MACRO_=1
_MACRO_ -I ..\inc -o ..\binary.exe ..src=1
I've been mostly impressed by the auto-discovery up to now, but it seems
that the parser can become a little confused with relative paths and
quotes...
Are these known/addressed in later release issues, or ones I should be
raising as defects?
Cheers,
Jon.
|
|
|
Powered by
FUDForum. Page generated in 0.03334 seconds