dynamic-linking

load dll from python

Hello. I'm building a python application from some source code I've found Here I've managed to compile and fix some problems by searching the web, but I'm stuck at this point: When running the application this message appears. This python app, usues swig to link to c/c++ code. I have VC++2005 express edition which I used to compi...

Loading multiple shared libraries with different versions

I have an executable on Linux that loads libfoo.so.1 (that's a SONAME) as one of its dependencies (via another shared library). It also links to another system library, which, in turn, links to a system version, libfoo.so.2. As a result, both libfoo.so.1 and libfoo.so.2 are loaded during execution, and code that was supposed to call func...

Calling Java (or python or perl) from a PHP script

Hi, I've been trying to build a simple prototype application in Django, and am reaching the point of giving up, sadly, as it's just too complicated (I know it would be worth it in the long-run, but I really just don't have enough time available -- I need something up and running in a few days). So, I'm now thinking of going with PHP ins...

Good resources concerning linking process in compilation

Hi everyone I've been coding for some time, and I always thought the linking phase of compilation was pretty straight forward, but recently I had to add a plugin system to an app, and I ran into quite a few compilation and runtime problems, due to my complete lack of knowledge on the matter. I've now got it working fine and learned a lo...

C identifier limits

How to call a name-mangled symbol from C? module.name:version void* function(TypeSig); // Type of the function I'd want to be able to use codepaths written in my language in C. The function calling convention is about the same. It's just that I must mangle in the version and the module path inside the symbols I export, and I have the...

Dynamic linking with smalltalk objects

I plan about implementing a dynamic linking into my smalltalk dialect. The problem is about getting message passing to work with dynamic linking. Message passing itself is as simple as this: message with a selector is sent to the object, the object picks up a method matching with the selector from it's protocol, it then process the data...

g++: In what order should static and dynamic libraries be linked?

Let's say we got a main executable called "my_app" and it uses several other libraries: 3 libraries are linked statically, and other 3 are linked dynamically. In which order should they be linked against "my_app"? But in which order should these be linked? Let's say we got libSA (as in Static A) which depends on libSB, and libSC which ...

MFC canned DllMain does not call ExitInstance for DLL_PROCESSS_DETACH?

The canned DllMain for MFC 8.0 does not seem to call ExitInstance when it gets a DLL_PROCESS_DETACH. One possible solution is to define my own DllMain, but how do I tell the linker to use mine and not MFC's? Or, is there another override which gets called on DLL_PROCESS_DETACH I'm not aware of? ...

How do I refer to a global variable in a dynamically linked library?

The environment is Solaris on 32bit SPARC, but I think this is a more general issue with dynamic linking and/or position independent code. I have an assembly program that I compile as position independent code and dynamically link to it from a C program. It works fine, except that I can't refer to any memory reserved by the assembly pro...

Building C++ source code as a library - where to start?

Over the months I've written some nice generic enough functionality that I want to build as a library and link dynamically against rather than importing 50-odd header/source files. The project is maintained in Xcode and Dev-C++ (I do understand that I might have to go command line to do what I want) and have to link against OpenGL and S...

eliminating the inter-compiler incompatibility issue with C++ dynamic libraries

..., a follow up to this. From the answers I've been given to my referenced question I've learned that: different compilers use different name decoration, which makes it impossible to use a C++ dynamic library built with compiler A in a project built with compiler B, the library can be built as static saving me including n header and ...

Installshield Dynamic Links Question

Is there any way to exclude a folder that is located under a dynamic link in InstallShield? So I have a dynamic link that starts at PATH_A, and the following is a small example directory structure: PATH A --- PATH B --- PATH C (which contains files) --- PATH D (which contains files) --- PATH E (which contains files...

interposers on Windows

Is it possible to substitute system functions, as is possible on Linux and Solaris using the LD_PRELOAD For example by setting the environment variable: LD_PRELOAD=/path/to/mymalloc.so I would have my replacement malloc functions instead of in the C runtime already installed in the system libraries. All other functions in the system d...

Statically and dynamically linking the same library

I have a program that's statically linking to a library (libA.2.0.a) and also dynamically links to another library (libB.so). libB.so also dynamically links to an older version of libA (libA.1.0.so). Is this configuration possible? And if so, how does the system know to use the symbols from libA.2.0.a for my program and the symbols from...

How lazy can C++ global initialization be?

I'm used to thinking of all initialization of globals/static-class-members as happening before the first line of main(). But I recently read somewhere that the standard allows initialization to happen later to "assist with dynamic loading of modules." I could see this being true when dynamic linking: I wouldn't expect a global initialize...

How to construct a C# plug-in framework?

I would like to implement a Plug-In framework for a C# application; such that the application doesn’t need to know of all of the available .DLL’s at time of compilation but can then be dynamically linked at run time. I expect that I will need to setup some expected parameters to pass information in and out of Plug-In’s but I’m not really...

How to distribute a Mac OS X with dependent libraries?

I have a program (specifically my entry for the SO DevDays Countdown app challenge) which relies on several dynamic libraries, namely libSDL, libSDL_ttf, and others. I have these libraries installed under /opt/local/lib via MacPorts, and many people won't have these installed (and some might have them installed, but not at that location...

How can I find which ELF dependency is not fulfill?

I've built a test ELF program using the LSB SDK (note that my question is not specific to LSB): $ /opt/lsb/bin/lsbcc tst.c $ ls -l a.out -rwxr-xr-x 1 math math 10791 2009-10-13 20:13 a.out $ file a.out a.out: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped ...

How can I find out what makes my application mix the statically and dynamically linked CRT

...

Google perftool cannot read file "libprofiler.so.0"

Hi all, I am trying the google performance tool for CPU time profiling. However, I had encountered some problem that I cannot read the shared library file "libprofiler.so.0" I had read the README of google performace tool, there are 3 steps in the manual: Compile my program with -lprofiler. I had done this part without any problem. Ru...