Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: ilikejello on August 12, 2014, 09:09:32 pm

Title: How to dump all predefined symbols known to the compiler?
Post by: ilikejello on August 12, 2014, 09:09:32 pm
Hello guys, I am relatively new to programming (I am a student) and I am wondering how I can dump all the predefined symbols used by the codeblocks (gcc) compiler?

Thank you very much.
Title: Re: How to dump all predefined symbols known to the compiler?
Post by: oBFusCATed on August 12, 2014, 10:16:22 pm
Are you talking about the defines? Then you can compile a simple source file and tell the compiler to dump the preprocessed source instead of generating object file.

For gcc I think it is something like: gcc -E main.c or g++ -E main.cpp, but I could be wrong of course, so consult the manual.
Title: Re: How to dump all predefined symbols known to the compiler?
Post by: BlueHazzard on August 12, 2014, 11:15:15 pm
or you run use the -v option
Title: Re: How to dump all predefined symbols known to the compiler?
Post by: Alpha on August 13, 2014, 12:03:53 am
g++ -dM -E -x c++ /dev/null