need help with c++ programming

P

perltcl

Hi

I have a problem that many c++ programmer's must have encountered some
time in the past. This is my problem: I am writing a program using a
large and complicated library. I have all the sources-- but when I am
using a particular method or function or member of a class, I don't
know where it really came from, from which file or which class,
especially those classes that have overwrittable or virtual functions
or members or methods. I'm working in linux environment, so all I have
are a large set of header files without nice IDE class viewer. While I
am still learning to use this particular library, I need to know when I
use a particular function that where it came from, from which file, so
that I may at least look at that file and learning about it. The
library is fair big--> so if I tried to recompile it and make some
changes to it in order to figure out what functions exactly I'm using,
is not an option.

So far, I've try to use gcc's preprocessor options to no avail: "gcc -E
-P -H"
Also, I look at gcc's special compiler attributes, but find nothing
useful.

Please help. Thanks.
 
K

Karl Heinz Buchegger

Hi

I have a problem that many c++ programmer's must have encountered some
time in the past. This is my problem: I am writing a program using a
large and complicated library. I have all the sources-- but when I am
using a particular method or function or member of a class, I don't
know where it really came from, from which file or which class,
especially those classes that have overwrittable or virtual functions
or members or methods.

In cases like that I take the samples that usually came with that library,
compile them and step them through using my debugger.
 
B

BigBrian

You can use doxygen to generate HTML files which will make browsing the
source easier. Also you can do something like

`find . -name "*.h" -print | xargs grep SomeFunctionName`

to search through your code.
 

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
474,291
Messages
2,571,492
Members
48,148
Latest member
Benzed8701

Latest Threads

Top