dynamic-linking

What's the difference between the -symbolic and -shared GCC flags?

From the documentation's description, they seem to do the same thing except that "not all systems" support shared and "only some systems" support symbolic (it's unclear if these are the same set of systems): -shared Produce a shared object which can then be linked with other objects to form an executable. Not all systems su...

How to use a C++ module from a Mono app

I'm trying to run my C#/C++ app on Linux after developing it on Windows. A small part of it, FooLib, is written in C++ which is pinvoked from C# for performance. FooLib uses no system calls, only standard C++ functionality. It exports a single function, declared as: extern "C" __declspec(dllexport) void Foo(float*, int, float*); It's...

How to I find the filename of a library via the library name?

How to I find the filename of a library via the library name? In otherwords, when I use "-lc", I know it is /lib/libc.so.6 (or something similar.) I want to be able to type some command where "-lc" is the input and "/lib/libc.so.6" is the output. To extend this idea futher, I wanted to specify my own search path so I can use this librar...

How do I use MacPorts to downgrade a dynamic library?

My py-mysql is farking because I've upgraded MySQL which replaced libmysqlclient_r.15.dylib with libmysqlclient_r.16.dylib. How do I find and get back the older version? EDIT: I found that to intall an older version of MySQL, I need to do @, but I'm still looking for the way to find the older versions. ...

How does libtool decide to build a shared library or not?

How does libtool decide to build a shared library or not? Chenz ...

When trying to run exe file without its dlls, there is no error message c#

Hi I have a c# application which has a dll added by reference. when I try to run the exe file from windows (after compilation) and the dll is renamed I want the application to show an error message ; Does someone know how can I do it in code? Thanks. ...

Recommendation for C++ wrapper for cross platform dynamic library bindings (basically a lightweight, high performance COM or CORBA) (only in-proc is necessary)

We're developing an application that will have a plug-in "architecture" to allow consumers of the app to provide their own proprietary algorithms. (We will basically have a set of parsers and allow third parties to provide their own as well) The domain space requires very high performance, so out-of-process bindings are not going to wo...

Static linking vs dynamic linking

Are there any compelling performance reasons to choose static linking over dynamic linking or visa versa in certain situations? I've heard or read the following, but I don't know enough on the subject to vouch for their veracity. 1) The difference in performance between static linking and dynamic linking is usually negligible. 2) (1) i...

Why doesn't g++ link with the dynamic library I create?

I've been trying to make some applications which all rely on the same library, and dynamic libraries were my first thought: So I began writing the "Library": /* ThinFS.h */ class FileSystem { public: static void create_container(string file_name); //Creates a new container }; /* ThinFS.cpp */ #include "ThinFS.h" void FileSystem::...

Link an external library at runtime in .NET

Hi, Is it possible for my application to monitor a folder that if we copy a DLL (library) in it, the application will pick it up and link it? I did a similar thing in C++ back in the days but is it possible to dynamically link a library in .NET? Thanks ...

mysqlclient library linkage problem

I am linking an application with mysqlclient library on 64-bit CentOS 5.4 and get a linkage error (cannot find -lmysqlclient). The library is in /usr/lib64/mysql/: una@localhost$ ll /usr/lib64/mysql/ total 9072 ... lrwxrwxrwx 1 root root 26 Jan 3 15:54 libmysqlclient_r.so -> libmysqlclient_r.so.15.0.0 lrwxrwxrwx 1 root root ...

C++ application - should I use static or dynamic linking for the libraries?

I am going to start a new C++ project that will rely on a series of libraries, including part of the Boost libraries, the log4cxx or the google logging library - and as the project evolves other ones as well (which I can not yet anticipate). It will have to run on both 32 and 64 bit systems, most probably in a quite diverse Linux enviro...

libc.so has four segments mapped in a process, why?

To see what memory map regions a running program contains, I write a simple C program to read data from /proc/self/maps: #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <unistd.h> #include <fcntl.h> int main() { char buf[1024]; int fd; ssize_t n; fd = open("/proc/self/maps", O_RDONLY); if (fd ...

How to deploy application that depends on dynamic libraries?

I am developing an application that uses the GStreamer library. In order to ease deployment I would like to collect all the GStreamer libraries in a local bundle. For this I wrote a little script that does the following: recursively traverse dependencies (using otool -L) copy all dependencies to a local directory make all the dependenc...

How to profile a shared object without profiling the host app?

I have a host application and I have written a plug-in. I compile my plug-in down to a shared object (say foo.so), and the host application will load it via dlopen. In this case, my host application is the opt tool from llvm (though I don't think that's important to the question). I'd like to compile my plug-in with profiling enabled ...

I need to link C program on a shared object with no section headers

I've written an interface to the code generator that lets me produce shared objects. Though I do not want o implement support for section header table because that's where the majority complexity of ELF file format remains in. GNU ld uses section headers for linking against shared objects. This means that when I try to put gcc link agai...

App looking for an invalid dynamic library

I keep getting multiple error windows for an app i'm developing asking for ._libpal_bullet.dll when it should really be just libpal_bullet.dll. The weird thing is after I get all the error messages, the app runs anyway using the correct dlls that exist in the same directory. How can i get rid of these errors? ...

Combining GPL and non GPL plugins in a dual licensing scheme

Our company releases a software (A) under a dual license: GPL and a commercial license. The commercial license allows users to link in closed source plugins (B). Now, a third party has developed a plugin (C) under GPL. My question is if a client who has our commercial license may load plugin (B) and plugin (C) at the same time. (C) wil...

Deploying QT app on OS X and linux

Whats the best way to deploy a QT app? I've read the documentation hosted at trolltech but is it better to link with a static library or the dynamic libraries and have the user install the framework? I don't really want anyone using my app to have to download a 160mb framework just to run a simple gui frontend. ...

running sparc solaris dynamic binary on sparc linux

I have dynamic linked binary for SPARC/Solaris and want to start in on SPARC linux. Is it possible? I have sources of the program, but when I compile it with modern GNU Fortran it does not work and do an infinite loop. Program is computation mathematics and I can't solve such loop easy. ...