shared-libraries

Why would a runtime undefined symbol be fixed by adding /usr/lib to ld.so.conf?

I've got a case in linux where gcc and ld build things cleanly, but at runtime I get an undefined symbol (for something in libxerces-c.so.28), reported by one of my own shared libraries, when running my program. First assumption was cache was broken, xerces recently installed, or something similar, so I ran ldconfig. Didn't fix it. But...

Shared object symbol resolution

Hi, Suppose I have 2 static Libs S1 and S2 which are different versions of the same lib and have the same C (not C++) interface though implementations are different. 2 shared libs D1 and D2 each of which links to S1 or S2 only. Suppose an application A links with S2 which is the more recent of the static libs and dynamically loads bo...

Determine which shared lib calls into my shared

Hello. Am trying to find a way of knowing which shared lib is calling into my shared lib function. The scenario is like this. I have used LD_PRELOAD to override malloc. Inside my malloc I forward the call directly to the real malloc but if the call came from a particular shared lib I want to do some processing before I forward the call...

Makefile Error : Command Not Found- while creating a shared library

I have 4 .c files hello.c,here.c,bye.c and main.c. One header file mylib.h The contents are as follows hello.c #include<stdio.h> void hello() { printf("Hello!\n"); } here.c #include<stdio.h> void here() { printf("I am here \n"); } bye.c #include<stdio.h> void bye() { printf("Bye,Bye"); } main.c #include<std...

how can I avoid performance bottleneck when using jni in a java web application/service

Greetings, I could not provide all the details in the question, so here are the key details. I have a native dll (and a corresponding .so) wrapping a static library, which is created by Eiffel programming language. I've written a C++ wrapper around the static lib, and I've successfully exposed this to Java. However, if I use this dll ...

how to link to shared lib from shared lib with relative path

Hello. I'm working on a Firefox plugin that uses external libraries to render 3D graphics on the browser. The problem is that i want the plugin to use external libraries packed with it without changing the LD_LIBRARY_PATH variable. The libraries are installed in a position relative to the plugin (a shared library too), while the actual...

Cross-Platform C++ Dynamic Library Plugin Loader

I was just wondering what my options were for cross-platform implementations for the dynamic loading of plugins using shared libraries. So far the only one that I have found is: http://library.gnome.org/devel/glib/stable/glib-Dynamic-Loading-of-Modules.html And I was just wondering if I had other options? Essentially, I want to be ab...

What is the need of randomizing memory addresses for loading libraries?

ldd displays the memory addresses where the shared libraries are linked at runtime $ cat one.c #include<stdio.h> int main() { printf ("%d", 45); } $ gcc one.c -o one -O3 $ ldd one linux-gate.so.1 => (0x00331000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x00bc2000) /lib/ld-linux.so.2 (0x006dc000) $ From this answer...

AIX5.2, xlC: Getting unresolved symbols when linking a shared library which depends on static library which depends on another static library

This is for AIX5.2, xlC compiler. Lets imagine we have two static libraries: A.a (contains funcA() function definition) B.a (contains funcB() and funcC() functions) Major thing is that funcB() in its body calls funcA() from A.a. But funcC() has independent code from A.a. Needs to create a shared library, libX.so, which calls funcC() fro...

Which linker setting determines the load path of a shared library?

I have built the Poco C++ library on Mac. When inspecting the built output files I notice that their load paths are absolute paths that point to the build directory. For example: $ otool -L libPocoFoundation.dylib libPocoFoundation.dylib: /Users/francis/orig/poco-1.3.6p2/lib/Darwin/i386/libPocoFoundation.9.dylib (compatibility versi...

Problem on Mac : "Can't find a register in class BREG while reloading asm"

I tried to port some code onto Mac OS X. The program uses the "ttmath" library, a header big-num header library. This library works fine on both windows and linux, but when I try to compile and run it on a Mac, the following error message always shows up : "can't find a register in class 'BREG' while reloading 'asm'". I found some d...

Debugging a library with Xcode

Hi there, I have a more general question on working with libraries on with Xcode when building iPhone apps. I've created a framework from a project I've been working on to use some parts of it in other apps. That works pretty good, so far. But I have no idea how to debug into the files included in the included framework. I hope to get ...

c++ simple shared library in linux

Hello experts, Is the STD library a shared library or what is it ? out of curiosity . Are there any books describe in detail the shared , static libraries development ? Are there any tutorial ? p.s (i'm using netbeans , eclipse, anjuta) and the tutorials aren't useful as I'm trying to understand what's actually going on. ...

mongo: error while loading shared libraries

I get this error when I try to run mongo, in ubuntu. mongo: error while loading shared libraries: libboost_thread-gcc42-mt-1_34_1.so.1.34.1: cannot open shared object file: No such file or directory I upgraded to Karmic yesterday. I have installed mongodb-stable from the repo mentioned here. I tried to apt-get libboost, but there is n...

How to link shared libraries in local directory, OSX vs Linux

Hi, I have some shared/dynamic libraries installed in a sandbox directory. I'm building some applications which link agains the libraries. I'm running into what appears to be a difference between OSX and Linux in this regard and I'm not sure what the (best) solution is. On OSX the location of library itself is recorded into the library...

Sharing DB Connections and already loaded scripts, styles on JSP Page

Hello everyone, I am currently trying to code our existing desktop application in JSP. To be able to maintain sustainability, have visual effects and get functionality, I have decided to use JQuery. After starting to code a month ago, we now realized that these pages are bringing a heavy usage of libraries (JQuery and JQueryUI librar...

What does "Ex" stand for in Windows API function names?

In windows APIs and various other libraries where I have seen multiple entry points to methods I have noticed the use of the Ex abbreviation in scenarios such as MyApiCall and MyApiCallEx. My assumption is that this stands for Extension or Extra could someone please confirm? Any history on why Ex was chosen rather then MyApiCall2 or si...

Is there a 64 bit TclPro ?

I am trying to install TclPro1.4 on 64 bit host. Here is what uname -a returns: Linux hp1 2.6.18-194.11.1.el5 #1 SMP Tue Aug 10 19:05:06 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux I have installed TclPro1.4 from corresponding iso disk image (it is available by the link mentioned above), but it installed 32 bit libraries instead of 64 bi...

GCC -m32 flag: /usr/bin/ld: skipping incompatible

On 64 bit host I am trying to build shared libraries with -m32 option. Is it possible for these libraries to be linked with regular 64 bit libraries? I am doing something like this: g++ -m32 -shared source.cpp -l 64_bit_library.so -o 32_bit_library.so and getting error messages like this: /usr/bin/ld: skipping incompatible 64_bit_li...

g++ linking problem.

I'm having a weird linking problem and am only beginning programming with c++ so I'm not terribly sure what it means... main.cpp #include <iostream> main(void) { return 0; } Compiling esr@athena:~/programming/cpp$ g++ main.cpp esr@athena:~/programming/cpp$ ./a.out esr@athena:~/programming/cpp$ g++ main.cpp -L/home/esr/ogre/lib ...