How to get the actual C code finally passed to compiler

L

linq936

Hi,
In the C code there are many #include and #define, I wonder if there
is a way I can see what is the final C file after all these pre-process
are done?

I am using Visual C compiler.

Thanks.
 
J

Jim Langston

Hi,
In the C code there are many #include and #define, I wonder if there
is a way I can see what is the final C file after all these pre-process
are done?

I am using Visual C compiler.

Thanks.

You should acutally ask in microsoft.public.vc but I think this will do it
for you:
project->properties->C/C++->Output Files->Expand Attributed Source [yes]
 
R

red floyd

Jim said:
Hi,
In the C code there are many #include and #define, I wonder if there
is a way I can see what is the final C file after all these pre-process
are done?

I am using Visual C compiler.

Thanks.

You should acutally ask in microsoft.public.vc but I think this will do it
for you:
project->properties->C/C++->Output Files->Expand Attributed Source [yes]

This is why you don't ask in this group. That's wrong. It's in
C/C++=>PreProcessor.
 
D

Dietmar Kuehl

In the C code there are many #include and #define, I wonder if there
is a way I can see what is the final C file after all these pre-process
are done?

All C and C++ compilers I have ever used supported the flag "-E"
which caused the compiler to spit out the preprocessed file. Of
course, I'm assuming you know how to compile your code from the
command line...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top