How to export external reference from a file of C source code?

J

Jackie

Dear all,

I want to have a list of external function calls and variables from a C
source file.
For example, a C file may use abs(), strcmp(), strncpy() from standard
liberary.
Usually, there will be a list file after compiler.
But, is there an utility that can analysis C source codes and list all
external reference?
 
G

George236

I don't know if this helps.

The linker produce such a list as errors if you try to compile your
program without the libraries.

George
<dracula.grabafreebie.com/index.htm>
 
R

Rick Anderson

I don't know if this helps.

The linker produce such a list as errors if you try to compile your
program without the libraries.

George
<dracula.grabafreebie.com/index.htm>

How about using "nm" on the compiled object file?
(i.e. "nm file.o | grep GLOB")

Rick
 
M

Mark McIntyre

How about using "nm" on the compiled object file?
(i.e. "nm file.o | grep GLOB")

that command apparently renames "file.o" to "| grep GLOB". I'm not sure how
helpful that is to the OP.

Or perhaps its a bad idea giving offtopic answers in CLC.....
 

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

Forum statistics

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

Latest Threads

Top