VC++ Complier option to produce listing file

How can I create a simple listing file and show all the included files and
macro expansions (in addition to the source code)...

on unix it would be -show include,expansion -source_listing
on NT it would be ???????

The nearest option I can find is in the C/C++ category of Project Setting where you can specify the listing file type to be in some Assembly form. But this doesn't give me references to includes, macro defs etc.

I am using VC++ 5.0

Thanks in advance.
baigmzAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cyberfrankCommented:
Hi!

Unfortunately there is no such option in VC, even in VC 6.0. But, there are some commercial tools which can create include graphs.

CF
0
cyberfrankCommented:
Hi!
I have found the software that I mentioned. It is written by guy@wyrdrune.com. I can send you the zipped file (with sources). As far as I know it is freeware, but for commercial purposes You have to consult with guy@wyrdrune.com.

CF
0
baigmzAuthor Commented:
Thanks. My email address is mzbaig@hotmail.com.
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

cyberfrankCommented:
Hi!

I'll send You immediately.

CF
0
baigmzAuthor Commented:
Actually, there is a /P switch which has
to be set in the Project Settings under
the C/C++ tab. This could give what I want. Please see online help on that switch for more info.
0
cyberfrankCommented:
Hi!

Unfortunatelly it is not so. The /P switch will produce a preprocessed sources (compilation units) into the *.i instead of *.obj. But here You'll find the source code too, and befor the class declaration you'll find the line info from the original file.
Is it that what You want?

CF
0
baigmzAuthor Commented:
I will review the program to see if it gives me more than the /P option.

baigmz
0
baigmzAuthor Commented:
Thanks for the program.
It looks like the program doesn't generate a file with the data I need.
0
mikeblasCommented:
In VC++ 6.0, there actually _is_ such an option. It's not documented, and not supported. It only works from the CL command line; you're not going to have much luck with it in the IDE.

   cl -d1Bshow_incl foo.cpp

..B ekiM

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mikeblasCommented:
Oh, and: use this option at your own risk. Like I said, it is unsupported. In the next version, it'll change, or be removed from the product, or be enhanced, or change its output format, or the option will change, or something. Or, there's an outside chance it'll just keep working.

..B ekiM
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.