News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

howto read preprocessor output?

Started by MoonKid, February 13, 2007, 11:47:05 AM

Previous topic - Next topic

MoonKid

How can I read the preprocessor output with Code::Blocks?
I am using the nightlys on WinXP.

krisz

If you use GCC you can use "-E" option to run the preprocessor, but stop before compilation and linking. Then you can open and read the result in a text editor.
For other compilers a similar option should/could exists.
K

MoonKid

Quote from: krisz on February 13, 2007, 11:58:55 AM
If you use GCC you can use "-E" option to run the preprocessor, but stop before compilation and linking. Then you can open and read the result in a text editor.

Ok I set -E in the "other compiler options" bymyself.

What file should I open? Do you mean the object (*.o) file?

It starts with lines like this

# 1 "E:\\Garage\\projekte\\OctopusBackup\\OBCore.cpp"
# 1 "E:\\Garage\\projekte\\OctopusBackup//"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "E:\\Garage\\projekte\\OctopusBackup\\OBCore.cpp"

Is this the file you mean?