473,800 Members | 2,518 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Way to view public function names in a library

Hi,

I got a C library, is there a way to view the public function names in
this library so that I can use in my C program?

Thanks.
Oct 9 '08
16 3289
On 9 Oct 2008 at 18:17, Nate Eldredge wrote:
Xiaoxiao <xi**********@l ive.comwrites:
>I got a C library, is there a way to view the public function names
in this library so that I can use in my C program?

However, on many systems the command that does this is called 'nm'.
As "Keith Thomson" has pointed out (in an unusually helpful answer for
him, given that the subject is one that he mistakenly regards is "off
topic"), while nm will list the *names* of the symbols (like function
names) in an object file or library, it won't tell you the actual
prototype of a function - you need the header file for that.

You should also be aware that if the library has been stripped of
debugging symbols (this will usually be the case for release versions of
libraries), then nm won't be able to list the symbols because they'll no
longer be there.

Oct 9 '08 #11
Antoninus Twink <no****@nospam. invalidwrites:
On 9 Oct 2008 at 18:17, Nate Eldredge wrote:
>Xiaoxiao <xi**********@l ive.comwrites:
>>I got a C library, is there a way to view the public function names
in this library so that I can use in my C program?

However, on many systems the command that does this is called 'nm'.

As "Keith Thomson" has pointed out (in an unusually helpful answer for
him, given that the subject is one that he mistakenly regards is "off
topic"), while nm will list the *names* of the symbols (like function
names) in an object file or library, it won't tell you the actual
prototype of a function - you need the header file for that.
True.
You should also be aware that if the library has been stripped of
debugging symbols (this will usually be the case for release versions of
libraries), then nm won't be able to list the symbols because they'll no
longer be there.
That's not correct. *Debugging* symbols may be missing, but what's
needed here are the symbols for the library's functions and variables
themselves. These must be present, because otherwise it would be
impossible to link against the library.

In the case of a shared library, some versions of nm don't show dynamic
symbols by default, so it may appear that there are no symbols. My
version of nm uses the -D option to show dynamic symbols, which would
still be present.

You are probably thinking of binaries (executables), which often are
distributed entirely stripped of symbols, as they're no longer needed.
Oct 9 '08 #12
Xiaoxiao wrote:
>
I got a C library, is there a way to view the public function
names in this library so that I can use in my C program?
I suggest reading the documentation.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home .att.net>
Try the download section.
Oct 10 '08 #13
On 9 Oct, 20:24, CBFalconer <cbfalco...@yah oo.comwrote:
Xiaoxiao wrote:
I got a C library, is there a way to view the public function
names in this library so that I can use in my C program?

I suggest reading the documentation.

--
*[mail]: Chuck F (cbfalconer at maineline dot net)
*[page]: <http://cbfalconer.home .att.net>
* * * * * * Try the download section.
Thanks a lot for more help again. I really appreciate the Internet and
everyone's unselfish help. When I know something in the future, I will
also try to help people on their questions.
Oct 10 '08 #14
On 10 Oct 2008 at 17:20, Xiaoxiao wrote:
On 9 Oct, 20:24, CBFalconer <cbfalco...@yah oo.comwrote:
>I suggest reading the documentation.

Thanks a lot for more help again. I really appreciate the Internet and
everyone's unselfish help.
Yep - help like that provided by CBF above you won't get anywhere except
on the internet...

Oct 10 '08 #15
Xiaoxiao wrote:
CBFalconer <cbfalco...@yah oo.comwrote:
>Xiaoxiao wrote:
>>I got a C library, is there a way to view the public function
names in this library so that I can use in my C program?

I suggest reading the documentation.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home .att.net>
Try the download section.

Thanks a lot for more help again. I really appreciate the Internet
and everyone's unselfish help. When I know something in the future,
I will also try to help people on their questions.
Bad idea. If you send them to a suitable newsgroup, you can answer
their question there. You will have some assurance that erroneous
answers will be corrected by other users. This (correction) does
not necessarily apply without picking the correct group.

Also, please always delete the signature from any quotation in your
reply. The signature is everything following the '-- ' sig marker
(inclusive).

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home .att.net>
Try the download section.
Oct 10 '08 #16
On 10 Oct 2008 at 22:34, CBFalconer wrote:
Xiaoxiao wrote:
>When I know something in the future, I will also try to help people
on their questions.

Bad idea.
All you need to know about CBF in two words.

Oct 10 '08 #17

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1698
by: Booted Cat | last post by:
I've seen lots of discussions on the proposed inclusion of "function call with named arguments" to C/C++ on these newsgroups. My proposal is slightly different in that: * No ANSI approval is needed * No conflicts with existing language features such as function overloading * No need to modify the language spec or the compiler * No need to modify your source code
8
2246
by: Alvo von Cossel I | last post by:
hey everybody, I have written a great browser but it is missing a feature (quite a lot actually, but forget about them for now). that feature just so happens to be the View > Source function. for those of you who don't what i mean, it is when you click a button in the view menu that says Page source (in Netscape) and source (in Internet Explorer). if you click it, notepad opens. in that window is the html for the page. anyway, does...
2
3390
by: Senapathy | last post by:
VC++ .NET 2003 Standard Edition Win XP, SP2 Hi, I have a code that builds under VC6.0, but fails to link in VC7.1. The offending code is as follows: _AFX_RICHEDIT_STATE* const pEditState = _afxRichEditState;
12
2220
by: Raed Sawalha | last post by:
I have the following table which i can not switcha to design view error message said Could not open in Design view. Quote values differently inside a '<% ...."value"... %>' block. and the line which make the error is anchor but i cannot make it work. <TABLE id="tblDocList" dir="<%#strLangDir%>" style="DISPLAY:inline"
10
8826
by: Zack Sessions | last post by:
Has anyone tried to create a SQL7 view using the CREATE VIEW command and ADO.NET? If so, is there a trick in trapping a SQL error when trying to create the view? I have a VB.NET app that, amoung other things, can create views based on existing tables and a table of column name equivalents. If I accidently introduce a column name equivalent that is the same as another column, I end up with a CREATE VIEW SQL statement that is in error, if...
1
3583
by: Director - Minvent | last post by:
Hi, I am trying to work out the easiest way to add some things to a treeview. I have got a list of the priviliged names for each of the computers e.g. LDAP://DomainName/CN=ComputerName,OU=OrgUnit1,OU=OrgUnit2, DC=DCRecord1,DC=DCRecord2 I am iterating through a list of these names to split them into strings for
0
2396
by: weiwei | last post by:
Hi; I am having trouble to get variable from grid view. here is my scenario. I want to delete a row in database from web page, in additon, I also want to delete that user's directory in c:drive. so far, I can only finished the first part which is to delete the row from database, Please see below code where I want to get variable in order to delete the directory. Thanks in advance <%@ Page Language="VB" Debug="true" %> <script...
0
2402
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile View I want the form populated from there profile on the sql server. The code to save the profile works fine. But when the user logs back in they data doesn't load back to the form. The multiview is located inside the LoginView's Logged-In View ....
0
1403
by: Christian | last post by:
Hi all, i already posted this in dotnet.vb.controls but i need some help, so i cant wait... I have written a web control library and have some problems with it. The Library contains only two Controls: a menu bar and a menu item class which can have sub items (from the same class and type).
0
9690
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9550
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10501
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10273
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7574
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5603
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.