473,807 Members | 2,851 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to obtain list of libraries?

Hello,

Is it possible to write a C program to find out what all the dynamic
and static libraries any executable is using.

I mean program should do what 'ldd' does on Unix and it should help me
in finding the static libraries also.

Any help is greatly appreciated.

Thanks
-Vittal
Nov 14 '05 #1
3 1262
Vittal wrote:
Hello,

Is it possible to write a C program to find out what all the dynamic
and static libraries any executable is using.

I mean program should do what 'ldd' does on Unix and it should help me
in finding the static libraries also.


Most program on Unix are written in C so the one you mention 'ldd'
probably two. Which with high probability answers your question: Yes!

This NG deals with standard C coding. Compilation and execution
environments are off topic.

Kees

Nov 14 '05 #2
vs*********@yah oo.com (Vittal) writes:
Is it possible to write a C program to find out what all the dynamic
and static libraries any executable is using.

I mean program should do what 'ldd' does on Unix and it should help me
in finding the static libraries also.


Your question is outside the domain of comp.lang.c, which discusses
only the standard C programming language, including the standard C
library. This is a remarkably narrow topic compared to what many
people expect.

For your convenience, the list below contains topics that are not
on-topic for comp.lang.c, and suggests newsgroups for you to explore
if you have questions about these topics. Please do observe proper
netiquette before posting to any of these newsgroups. In particular,
you should read the group's charter and FAQ, if any (FAQs are
available from www.faqs.org and other sources). If those fail to
answer your question then you should browse through at least two weeks
of recent articles to make sure that your question has not already
been answered.

* OS-specific questions, such as how to clear the screen,
access the network, list the files in a directory, or read
"piped" output from a subprocess. These questions should be
directed to OS-specific newsgroups, such as
comp.os.ms-windows.program mer.misc, comp.unix.progr ammer, or
comp.os.linux.d evelopment.apps .

* Compiler-specific questions, such as installation issues and
locations of header files. Ask about these in
compiler-specific newsgroups, such as gnu.gcc.help or
comp.os.ms-windows.program mer.misc. Questions about writing
compilers are appropriate in comp.compilers.

* Processor-specific questions, such as questions about
assembly and machine code. x86 questions are appropriate in
comp.lang.asm.x 86, embedded system processor questions may
be appropriate in comp.arch.embed ded.

* ABI-specific questions, such as how to interface assembly
code to C. These questions are both processor- and
OS-specific and should typically be asked in OS-specific
newsgroups.

* Algorithms, except questions about C implementations of
algorithms. "How do I implement algorithm X in C?" is not a
question about a C implementation of an algorithm, it is a
request for source code. Newsgroups comp.programmin g and
comp.theory may be appropriate.

* Making C interoperate with other languages. C has no
facilities for such interoperation. These questions should
be directed to system- or compiler-specific newsgroups. C++
has features for interoperating with C, so consider
comp.lang.c++ for such questions.

* The C standard, as opposed to standard C. Questions about
the C standard are best asked in comp.std.c.

* C++. Please do not post or cross-post questions about C++
to comp.lang.c. Ask C++ questions in C++ newsgroups, such
as comp.lang.c++ or comp.lang.c++.m oderated.

* Test posts. Please test in a newsgroup meant for testing,
such as alt.test.

news.groups.que stions is a good place to ask about the appropriate
newsgroup for a given topic.

--
"I've been on the wagon now for more than a decade. Not a single goto
in all that time. I just don't need them any more. I don't even use
break or continue now, except on social occasions of course. And I
don't get carried away." --Richard Heathfield
Nov 14 '05 #3
On 18 May 2004 01:51:39 -0700, vs*********@yah oo.com (Vittal) wrote:
Is it possible to write a C program to find out what all the dynamic
and static libraries any executable is using.

I mean program should do what 'ldd' does on Unix and it should help me
in finding the static libraries also.


That's very platform specific, each platform will have it's own way of
linking/referencing to dynamic and static libraries. You should try
the newsgroup specific to your platform, i.e. win32, unix/linux, etc.
Nov 14 '05 #4

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

Similar topics

1
1823
by: comp.lang.php | last post by:
/** * Filter results according to given instruction * * @access private * @param object $result (reference) * @return object $filteredResult */ function &filterResults(&$result) { // STATIC OBJECT ARRAY METHOD global $section;
4
5922
by: Rithish | last post by:
Is there a way to obtain the height of a <SELECT> element dynamically, i.e. through javascript? I want to dynamically display a list box onFocus of a text box element. Also, if the list box would move out of the bottom screen area, I would want to move it up by that fraction so that it displays at the bottom of the screen. To do this, I would need to acquire the height of the SELECT element. I tried quite a few methods. ...
7
1870
by: Bo Peng | last post by:
Dear list, I have a long list of commands in the form of a script and would like to obtain a log file as if I enter the commands one by one. (The output will be used in a tutorial.) What would be the best way to do it? Copy and paste is not acceptable since I make frequent changes tot he script. Many thanks in advance. Bo
3
1791
by: Eliu Montoya | last post by:
Hello everybody, Does anyone know an easy way to insert a record (without a value for the primary key because it is a sequence) and at the same time obtain the value of primary key that was assign to this new record. I always try insert and then select with the same values that I used for the insert, but I believe this is not a good way to do it.
11
387
by: babuyama | last post by:
Hi, Is there a way to obtain library name at compile/preprocessor time? Assuming that the compilation unit, myfile.c is part of mylib.a, from myfile.c code at compile/preprocessor time, I would like to know that the library name is "mylib". I could not find an equivalent of __FUNCTION__, __FILE__ defines for getting the library name. Is there another way? Thanks, Babu
2
3897
by: Rodrigo C. Souza | last post by:
How to obtain the IP address of the interface that is connected to the Internet? I´m using the code below to get IP address of the local machine: //********************************************* private void button1_Click(object sender, System.EventArgs e) { string HostName = Dns.GetHostName(); lblHostName.Text=HostName; IPHostEntry ipEntry = Dns.GetHostByName (HostName); IPAddress addr = ipEntry.AddressList;
0
1154
by: brbxx99x | last post by:
Hi, I'm just wondering how I can display the outlook address list (the screen that is displayed when one clicks on either the TO, CC or BCC buttons) and retrieve the email addresses that the user selects once that screen is closed. I'd rather not code the same functionality but would rather display the 'standard' outlook screen and obtain the data from that. Is this possible? Any information would greatly be appreciated. Thanks in...
1
6187
by: yaarnick | last post by:
Create a linked list data structure library to hold strings. Then library should support the following linked list operations. Create() – Creates the linked list Insert() – Insert a string into the linked list Delete() – Deletes a string from the linked list Search() – Search for a string and return 1 if found otherwise return 0. isEmpty() – Returns 1 if the list is empty and 0 otherwise. Display() – Display all the strings in the list. ...
3
1742
by: JurgenvonOerthel | last post by:
I want to replace one element in a list<stringby a list<stringand I need to obtain an iterator to the first element in the inserted list. In code: void replace_element_by_list(list<string&my_list, list<string>::iterator &iter_to_remove, const list<string> &list_to_insert) {
0
9599
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
10624
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
10371
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
10374
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9193
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
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...
1
4330
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
2
3853
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.