shared-libraries

static library install under Linux - should it be similar to dynamic library install?

I've spend the morning figuring out how in a makefile to do a shared library install under Linux. So that's fine; I now have my shared object and a pair of soft links to it, one of which was created by ldconfig and one by me. Now, I can also build my library as a static library. When I check /usr/lib, I see the .a files there just bei...

Is prelinking on linux for shared libraries any good (proven)

The shared libraries have a problem of latency of linking when the executable is loaded. There is a concept of 'prelink' on linux and preloading on MAC, which actually helps removing this link time. Has this prelink on linux been proven efficient ? Also when was it introduced, and is it being used widely ? ...

Profile a C shared library called by Ruby program

I have a program written in Ruby and C. The C portion is a shared library, which is an extension for the Ruby program. I want to profile the C shared library I wrote, using gprof. I compile the shared library like this: gcc -I. -I/usr/lib/ruby/1.8/i486-linux -I/usr/lib/ruby/1.8/i486-linux -I. -D_FILE_OFFSET_BITS=64 -fPIC -fno-strict-al...

Using gmp 5 on CentOs 5.3

Hey, I'm using CentOS version 5.3 x86_64, Intel X5550 processor. I compiled gmp 5.0.0 on this system. When I try to run it, I'm getting the error :- error while loading shared libraries: libgmp.so.3: wrong ELF class : ELFCLASS64 which I can't understand since I'm working on a 64-bit system with a 64-bit isa. Any help would be welco...

Automake and standard shared libraries

How can I force automake to create a standard shared library, instead of a libtoolized one? Normally, I'd create the abc.so which is referenced with a full path and loaded into the main program. Is there a way to force AM to do the same? If I list it as _LIBRARY, automake complains: 'abc.so' is not a standard library name; did you mean '...

Stripping linux shared libraries

We've recently been asked to ship a Linux version of one of our libraries, previously we've developed under Linux and shipped for Windows where deploying libraries is generally a lot easier. The problem we've hit upon is in stripping the exported symbols down to only those in the exposed interface. There are three good reasons for wantin...

How much disk space do shared libraries really save in modern Linux distros?

In the static vs shared libraries debates, I've often heard that shared libraries eliminate duplication and reduces overall disk space. But how much disk space do shared libraries really save in modern Linux distros? How much more space would be needed if all programs were compiled using static libraries? Has anyone crunched the numbers ...

Programming in Unix: Sharing libraries with libraries.

Hi, everyone. Working in C, on top of unix, I am loading and using a shared library somewhat as follows: ... handle = dlopen("nameOfLib"); ... libInit(); ... libGoToState1(); libGoToState2(); .... libTerminate(); ... dlclose(handle); ... What I would like is for my application to admit 'plugins' which take the form of dy...

WSS 3.0 Features

Hi All, are there any specific features of WSS 3.0 which can be used by the object model alone wihout requiring to use their templates?? ...

Shared code libraries and cruise control testing

I have 2 applications sharing a common library. Both apps and the library are in active development. Both apps include the project file in their solution. The folders are laid out in source control as: Root App1 App2 Library We currently have separate cruise control builds set to run any time a file is committed to the app1, ...

Can i create a shared lib which has both shared and static library.

I am tryng to create a shared library which internally is linking to many shared lib and a static lib . In my case my shared lib is not including static lib . I want to know what i am trying whether it is correct or i need to convert static lib to shared lib and then do the linking . I need to know that is there any makefile flag whic...

Weblogic 10 shared library not showing up in referencing apps

Hi, On WebLogic 10.0 I use the "Shared J2EE Libraries" ( http://download.oracle.com/docs/cd/E11035_01/wls100/programming/libraries.html ) feature of WLS to group some jars which would need to be accessible in multiple ear's. These jars resided on the system classpath, and I try to move them into the shared lib from there. My problem is...

problem with different linux distribution with c++ executable

Hi. I have a c++ code that runs perfect on my linux machine (Ubuntu Karmic). When I try to run it on another version, I have all sort of shared libraries missing. Is there any way to merge all shared libraries into single executable? Edit: I think I've asked the wrong question. I should have ask for a way to static-link my executable w...

getting dependent modules (shared objects) for a binary

I have a binary file on linux .. tclsh8.4. It depends on certain tcl*.so files. Is there a way to get this information from the binary file itself? The tcl*.so files on which the binary tclsh8.4 depends is in some other directory having limited permission. What should I do to the binary file in order to use the same .so files from so...

Is there anything like Python's ctype for PHP? Accessing libraries without the need to write an extension?

Python has ctypes to access libraries. In PHP you write extensions for everything. Popular extensions like the one for libgd are available almost everywhere. Is there any extension which works like Python's ctypes, letting you access libraries without the need to write an PHP extension? ...

gcc code::blocks shared library questions

I'm using code::blocks on a linux system with the gcc compiler, and I want to be able to use the shared library template to make a shared library with classes, then make another project that accesses that shared library(at compile time, not dynamically) and classes. I'm sure that code::blocks has simple way of doing this without making c...

AIX/UNIX: module has an invalid magic number

hi, On AIX, I am executing a script. In this script, it tries to load a 64 bit shared object lib ( .so file) . It fails to do so by giving the following error: The module has an invalid magic number. If I type "prtconf" it shows me that the system is 64 bit. Can anyone help? ...

how to linking with dynamic lib (.so) and static libc.a

Hi I'm trying to link with the static libc.a and a dynamic lib .so unsuccessfully. I've already tryied the following: Firstly I test with all dynamic: gcc -shared libtest.c -o libtest.so gcc -c main.c -o main.o gcc main.o -o test -L. -ltest It's working (compile and execute) Secondly I test what I want (dynamic lib and static lib...

solaris elfedit: Is there something similar for linux ? (a shared library editor)?

Linux: It there a way to edit a compiled shared library ? specifically I am searching on how to add the DT_SYMBOLIC flag on an already compiled binary shared library? Here is why I am asking this: our application is composed of our own libraries (static libXXX.a) some 3rd party libs (binary-only shared libraries libYYY.so) Every...

Dynamic loading and symbols sharing

Hi, I'm trying to load a module library via dl in such way, that the module can access globals from the main application. How is that possible to do? I get an error message from dlopen saying library/name.so: undefined symbol: .... The only flag used is: RTLD_NOW. The module itself is build with libtool with -module -avoid-version. ...