[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

VC++ Complier option to produce listing file

Posted on 2000-01-04
10
Medium Priority
?
179 Views
Last Modified: 2013-11-20
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.
0
Comment
Question by:baigmz
  • 4
  • 4
  • 2
10 Comments
 
LVL 2

Expert Comment

by:cyberfrank
ID: 2325218
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
 
LVL 2

Expert Comment

by:cyberfrank
ID: 2325243
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
 

Author Comment

by:baigmz
ID: 2325264
Thanks. My email address is mzbaig@hotmail.com.
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 2

Expert Comment

by:cyberfrank
ID: 2325267
Hi!

I'll send You immediately.

CF
0
 

Author Comment

by:baigmz
ID: 2325271
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
 
LVL 2

Expert Comment

by:cyberfrank
ID: 2325283
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
 

Author Comment

by:baigmz
ID: 2325294
I will review the program to see if it gives me more than the /P option.

baigmz
0
 

Author Comment

by:baigmz
ID: 2325335
Thanks for the program.
It looks like the program doesn't generate a file with the data I need.
0
 
LVL 11

Accepted Solution

by:
mikeblas earned 140 total points
ID: 2326386
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
 
LVL 11

Expert Comment

by:mikeblas
ID: 2326388
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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
Suggested Courses
Course of the Month8 days, 23 hours left to enroll

590 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question