Author Topic: howto read preprocessor output?  (Read 5600 times)

Offline MoonKid

  • Almost regular
  • **
  • Posts: 180
howto read preprocessor output?
« on: February 13, 2007, 11:47:05 am »
How can I read the preprocessor output with Code::Blocks?
I am using the nightlys on WinXP.

krisz

  • Guest
Re: howto read preprocessor output?
« Reply #1 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.
For other compilers a similar option should/could exists.
K

Offline MoonKid

  • Almost regular
  • **
  • Posts: 180
Re: howto read preprocessor output?
« Reply #2 on: February 13, 2007, 10:13:45 pm »
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?