Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » c-code after preprocessor operation in eclipse(I want to see c-code after preprocessor operation in eclipse)
c-code after preprocessor operation in eclipse [message #1718833] Wed, 30 December 2015 21:47 Go to next message
rene koenig is currently offline rene koenigFriend
Messages: 1
Registered: December 2015
Junior Member
Hello,

I want to show the result after preprocessor operation in eclipse cdt.
With gcc -E, I can show the C source code after the preprocessor operation. Is that possible to add gcc- E in a configuration of eclipse to show the C code after preprocessor operation?

best regards
Re: c-code after preprocessor operation in eclipse [message #1718885 is a reply to message #1718833] Thu, 31 December 2015 19:25 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
The answer is yes.
Is it safe to presume you are asking how?

Go to Manage configurations (it's in many places and not just in the Build Variables dialog as shown)
http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Freference%2Fcdt_u_prop_all.htm
Make a new configuration.

Go to Project ==> Properties ==> C/C++ Build ==> Settings and change the gcc compiler command. in the Tool Settings tab.
You probably will want to redirect the output to a file so the command will be something like: gcc -E ... > $(ProjName).preprocessOutput

[Updated on: Thu, 31 December 2015 19:34]

Report message to a moderator

Previous Topic:Lost significant code edits while trying to refactor some class names
Next Topic:"Launch failed. Binary not found" with MINGW
Goto Forum:
  


Current Time: Fri Apr 26 20:25:23 GMT 2024

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

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

Back to the top