Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Detecting include paths and preprocessor symbols(
Detecting include paths and preprocessor symbols( [message #1797121] Thu, 25 October 2018 17:10 Go to next message
Eclipse UserFriend
I've read the Eclipse help and found that the CDT determines include paths and preprocessor symbols using two techniques:

1. Querying the compiler itself for built-in include paths and predefined macros
2. Parsing the build output for include paths and macros added via command line arguments

Rightmove Kijiji Quizlet

For 2, the help page indicates it relies on the verbose build output of the build system. So, if a build system redirects compiler output to a logfile instead of stdout, then these command line options would not be seen during the parsing step.

Are there Language Setting Providers that can capture command line parameters when the build system redirects the compiler command line parameters away from stdout? I can envision a ptrace-based method on Linux to capture all child process parameters, but have not found any mention of an CDT provider that does this.

Thanks,

[Updated on: Thu, 25 October 2018 20:21] by Moderator

Report message to a moderator

Re: Detecting include paths and preprocessor symbols( [message #1797137 is a reply to message #1797121] Fri, 26 October 2018 05:53 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Not sure what you are using.
Eclipse CDT generally expects you to be using make and GCC (or clang).
It also has a provider for scanning Libtool output.
If you are using anything else then you likely will need to modify the Eclipse CDT code yourself.

You might try changing the log file being used
(Project --> Properties --> C/C++ Build --> Logging)
or maybe add a post build or compile step that appends the redirected output to stdout or the log

Any post step would have to be supported by whatever build system you are using as Eclipse will only add steps to a makefile it is creating.


Another option would be to change the build command to a script which will do the appending.

Note that you will still need to have the compile command resemble a GCC compile command so that -I and -D are present in the command.


[Updated on: Fri, 26 October 2018 06:04]

Report message to a moderator

Previous Topic:Debug Docker Container Port Problem
Next Topic:Why does everyone hate Eclipse?
Goto Forum:
  


Current Time: Sat Apr 27 04:59:31 GMT 2024

Powered by FUDForum. Page generated in 0.03873 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top