Sponsored Content
Operating Systems Linux Could static library include static library? Post 302410843 by hergp on Wednesday 7th of April 2010 03:45:59 AM
Old 04-07-2010
If you need them both, just rename one of them to another name. The filename of the object is not relevant for linking.

If both object files export symbols with the same name, you have to decide, which one to keep.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to change a Makefile from building static library to shared library?

Hi: I have a library that it only offers Makefile for building static library. It built libxxx.a file. How do I in any way build a shared library? (either changin the Makefile or direct script or command to build shared library) Thanks. (1 Reply)
Discussion started by: cpthk
1 Replies

2. IP Networking

I need HELP to Set up Coyote Linux router with 1 static IP & 64 internal static IP

hello, i need help on setting my coyote linux, i've working on this for last 5 days, can't get it to work. I've been posting this message to coyote forum, and other linux forum, but haven't get any answer yet. Hope someone here can help me...... please see my attached picture first. ... (0 Replies)
Discussion started by: dlwoaud
0 Replies

3. Programming

Adding a Static Library (libtimer.a) to the Makefile

Hi, The following is my Makefile, I wanted to add a staic library named libtimer.a. I'm using the following Makefile. Please let me know how to add this static library: Makefile:- It produces "usbserial" executable. Thanks, S (1 Reply)
Discussion started by: suryaemlinux
1 Replies

4. Programming

Static and Shared Library in Makefile

I am having a devil of a time with a very simple make file. The program needs two shared and one static library. If I link the shared libraries only like below the mysql test app works ... (1 Reply)
Discussion started by: jadsys
1 Replies

5. Programming

Even the Static cURL Library Isn't Static

I'm writing a program which uses curl to be run on Linux PCs which will be used by a number of different users. I cannot make the users all install curl on their individual machines, so I have tried to link curl in statically, rather than using libcurl.so. I downloaded the source and created a... (8 Replies)
Discussion started by: BrandonShw
8 Replies

6. Linux

./configure problem for libsf library due to apparently missing libdb library.

Hello, ./configure script fails to configure libsf. Please check the following last few lines of configure script error. checking for db1/db.h... no checking for db.h... yes checking for dbopen in -ldb1... no configure: error: No libdb? No libsf. But find command shows the following; ... (4 Replies)
Discussion started by: vectrum
4 Replies

7. Programming

g++ fails to link to static library when compilation and link in single command

Hello All, I've encountered a strange behaviour from g++ that doesn't make sense to me. Maybe you can shed some light on it: I have a bunch of source files and want to compile them and link them with a static library liba.a located in /usr/local/lib64 into an executable Approach 1 works... (0 Replies)
Discussion started by: magelord
0 Replies

8. UNIX for Dummies Questions & Answers

Shared static library

Hello Please what does mean shared static library and LD-Preload? Thank you (3 Replies)
Discussion started by: chercheur857
3 Replies

9. HP-UX

How to use chatr to change static library path in binary?

I have solved this but now cannot recall the syntax. I want to strip or change the hard wired library paths on binaries I download from a repository. I do not have root and just want a personal install, but would rather not build every tool. I even posted the solution here once for others, but... (2 Replies)
Discussion started by: DGPickett
2 Replies

10. UNIX for Dummies Questions & Answers

How to include cURL library?

Hi, I've got a project to write a C++ code to open a webpage,read the content and write it in a file. I'm using cURL and compiling the code using G++ in unix. I'm getting compilation error as: "cURL.h: no file or directory". Can some one please tell me how to install/link this library in... (3 Replies)
Discussion started by: Ribosome
3 Replies
ldopen(3x)																ldopen(3x)

Name
       ldopen, ldaopen, ldreadst - open a common object file for reading

Syntax
       #include <stdio.h>
       #include <filehdr.h>
       #include <syms.h>
       #include <ldfcn.h>

       LDFILE *ldopen (filename, ldptr)
       char *filename;
       LDFILE *ldptr;

       LDFILE *ldaopen (filename, oldptr)
       char *filename;
       LDFILE *oldptr;

       ldreadst (ldptr, flags)
       LDFILE *ldptr;
       intflags;

Description
       The  and functions provide uniform access to simple object files and to object files that are members of archive files.	An archive of com-
       mon object files can be processed as if it is a series of simple common object files.

       If ldptr has the value null, opens filename, allocates and initializes the LDFILE structure, and returns a pointer to the structure to  the
       calling program.

       If ldptr is valid and TYPE(ldptr) is the archive magic number, reinitializes the LDFILE structure for the next archive member of filename.

       The  and  functions work in concert.  The function returns failure only when only when TYPE(ldptr) is the archive magic number and there is
       another file in the archive to be processed.  Only then should be called with the current value of ldptr.  In all other	cases,	but  espe-
       cially when a new filename is opened, should be called with a null ldptr argument.

       The following is a prototype for the use of and
       /* for each filename to be processed*/

       ldptr = NULL;
       do
	    if ( (ldptr = ldopen(filename, ldptr)) != NULL )

	    {
		 /* check magic number */
		 /* process the file */
	    }
       } while (ldclose(ldptr) == FAILURE );

       If  the	value  of  oldptr  is  not NULL, opens filename anew and allocates and initializes a new LDFILE structure, copying the fields from
       oldptr.	The function returns a pointer to the new LDFILE structure.  This new pointer is independent of the old pointer, oldptr.  The  two
       pointers  can  be  used	concurrently to read separate parts of the object file.  For example, one pointer can be used to step sequentially
       through the relocation information while the other is used to read indexed symbol table entries.

       The and functions open filename for reading.  If filename cannot be opened or if memory for the LDFILE structure cannot be allocated,  both
       functions return NULL.  A successful open does not ensure that the given file is a common object file or an archived object file.

       The  function  causes  the symbol table header and file descriptor table to be read.  Further access, using ldptr, causes other appropriate
       sections of the symbol table to be read (for example, if you call the symbols or externals are read).  To force sections  for  each  symbol
       table in memory, call with ST_P* constants or'ed together from st_support.h.

See Also
       fopen(3s), ldclose(3x), ldfcn(5)

								       RISC								ldopen(3x)
All times are GMT -4. The time now is 08:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy