Sponsored Content
Top Forums Shell Programming and Scripting How to change a Makefile from building static library to shared library? Post 302347532 by cpthk on Wednesday 26th of August 2009 01:15:59 AM
Old 08-26-2009
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.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

building a 64-bit archive library

I'm trying to build an archive library using the following script. It builds fine on 32-bit architectures, but when I try to build on a computer with 64-bit architecture I get this error message: /usr/bin/ld: warning: i386 architecture of input file `../lpdlib/lpdlib_byteswapio.a(system.o)' is... (1 Reply)
Discussion started by: echorak
1 Replies

2. Programming

Makefile shared library g++

I'm having trouble with my makefile, I'm trying to code a shared library to be used by another program *EDIT* Found the solution: CC = g++ MODULES= readconfig.o ReadConfigLib.o OBJECTS= RCLOBJECTS= ReadConfigLib.cpp readconfig.cpp configDefinitions.h readconfig.h ReadConfigLib.h... (0 Replies)
Discussion started by: james2432
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. Linux

Could static library include static library?

I have some static library(libxxx.a libyyy.a). And I want to generate my library(libzzz.a), libzzz.a will use libxxx.a and libyyy.a I wan't my application only use libzzz.a, (means libzzz.a had include libxxx.a, libyyy.a), how can I do that? Thank you. example: I have zzz.c. I do ... (4 Replies)
Discussion started by: freemagic
4 Replies

5. 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

6. 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

7. 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

8. Programming

Shared library with acces to shared memory.

Hello. I am new to this forum and I would like to ask for advice about low level POSIX programming. I have to implement a POSIX compliant C shared library. A file will have some variables and the shared library will have some functions which need those variables. There is one special... (5 Replies)
Discussion started by: iamjag
5 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. AIX

Add shared members from library to same library in a different directory

I'm trying to install libiconv to AIX 7.1 from an rpm off of the perzl site. The rpm appears to install but I get this error message. add shr4.o shared members from /usr/lib/libiconv.a to /opt/freeware/lib/libiconv.a add shr.o shared members from /usr/lib/libiconv.a to ... (5 Replies)
Discussion started by: kneemoe
5 Replies
MM-CONFIG(1)						       Shared Memory Library						      MM-CONFIG(1)

NAME
mm-config - OSSP mm library configuration/build utility VERSION
OSSP mm 1.4.1 (10-Aug-2006) SYNOPSIS
mm-config [--help] [--version] [--cflags] [--ldflags] [--libs] DESCRIPTION
The mm-config program is a little helper utility for easy configuring and building applications based on the mm(3) library. It can be used to query the C compiler and linker flags which are required to correctly compile and link the application against the mm(3) library. OPTIONS
mm-config accepts the following options: --help Prints the short usage information. --version Prints the version number and date of the installed mm(3) library. --cflags Prints the C compiler flags which are needed to compile the mm(3)-based application. The output is usually added to the "CFLAGS" vari- able of the applications "Makefile". --ldflags Prints the linker flags ("-L") which are needed to link the application with the mm(3) library. The output is usually added to the "LDFLAGS" variable of the applications "Makefile". --libs Prints the library flags ("-l") which are needed to link the application with the mm(3) library. The output is usually added to the "LIBS" variable of the applications "Makefile". EXAMPLE
CC=cc CFLAGS=-O `mm-config --cflags` LDFLAGS=`mm-config --ldflags` LIBS=-lm `mm-config --libs` all: foo foo: foo.o $(CC) $(LDFLAGS) -o foo foo.o $(LIBS) foo.o: foo.c $(CC) $(CFLAGS) -c foo.c SEE ALSO
mm(3). AUTHOR
Ralf S. Engelschall rse@engelschall.com www.engelschall.com 10-Aug-2006 MM 1.4.1 MM-CONFIG(1)
All times are GMT -4. The time now is 01:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy