shared-libraries

Source Control for multiple projects/solutions with shared libraries

I am currently working on a project to convert a number of Excel VBA powered workbooks to VSTO solutions. All of the workbooks will share a number of class libraries and third party assemblies, in fact most of the work is done in the class libraries. I currently have my folder structure laid out like this. Base Libraries Ass...

DLL-s using C++ on Linux

I have tried to find how to create DLL-s on linux using google, but got very confusing information. Is it possible to write dynamic link libraries on linux? If not, are there other means by which I can call code in another module from several running programs? ...

How do I create a dynamic library (dylib) with Xcode?

I'm building few command-line utilities in Xcode (plain C, no Cocoa). I want all of them to use my customized version of libpng, and I want to save space by sharing one copy of the library among all executables (I don't mind re-distributing .dylib with them). Do I need to do some magic to get libpng export symbols? Does "Link Binary Wi...

shared library problems on linux

I'm trying to compile/link a very old piece of software on a linux system and I can't for some reason link with a shared library that's installed on my system. I get the following error from the linker: /usr/bin/ld: cannot find -lXaw However, the lib itself is installed. If I run ldconfig -v | grep libXaw I get (among other thing...

How to link using GCC without -l and without hardcoding path

I have a shared library that I wish to link an executable against using GCC. The shared library has a nonstandard name not of the form libNAME.so, so I can not use the usual -l option. (It happens to also be a Python extension, and so has no 'lib' prefix.) I am able to pass the path to the library file directly to the link command line, ...

gcc linker issue

I am trying to make a library that wraps libpurple (you shouldn't need to know anything about libpurple to help here). Libpurple in turn loads "plugins" which are just .so's accessed via something like dlopen. Those plugins in turn call back to functions in libpurple. I can build my library just fine, but when it calls the appropriate l...

GCC and ld can't find exported symbols...but they're there!

I have a C++ library and a C++ application trying to use functions and classes exported from the library. The library builds fine and the application compiles but fails to link. The errors I get follow this form: app-source-file.cpp:(.text+0x2fdb): undefined reference to `lib-namespace::GetStatusStr(int)' Classes in the library see...

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

How can I specify that library X must be linked statically ?

I have a piece of software which is linked against several libraries. They all exists in a dynamic (.so) and a static (.a) version. By default, when using g++ it chooses the dynamic version of the libraries and that's fine with me. However, one of them absolutely needs to be linked statically. I thought about using -static but then it ...

How do I control which symbols a Windows DLL imports from the application?

I'm trying to build a shared library (DLL) on Windows, using MSVC 6 (retro!) and I have a peculiar link issue I need to resolve. My shared library must access some global state, controlled by the loading application. Broadly, what I have is this: application.c: static int g_private_value; int use_private_value() { /* do somethin...

Unix question: Automatically recognize path for locally installed libraries

I work on a Fedora Linux box. I have a whole host of binaries and libraries that I've installed locally under my home directory. I'd like to set my system up so installing software there functions the same way (for me) as if the root user installed it without a prefix. I can run binaries installed in ~/local/bin just fine by adding th...

Determine target architecture of binary file in Linux (library or executable)

We have an issue related to a Java application running under a (rather old) FC3 on a Advantech POS board with a Via C3 processor. The java application has several compiled shared libs that are accessed via JNI. Via C3 processor is suppossed to be i686 compatible. Some time ago after installing Ubuntu 6.10 on a MiniItx board with the sam...

Are there any tools for checking symbols in cross compiled .so files?

I've got an application that loads .so files as plugins at startup, using dlopen() The build environment is running on x86 hardware, but the application is being cross compiled for another platform. It would be great if I could (as part of the automated build process) do a check to make sure that there aren't any unresolved symbols in ...

Creating an object in shared memory inside a Shared Lib (so) in C++

Is it possible to share a single 'god' instance among everyone that links to this code, to be placed in a shared object? god* _god = NULL; extern "C" { int set_log_level(int level) { if(_god == NULL) return -1; _stb->log_level(level); return 0; } int god_init(){ if(_god == NULL){ _god = new god(); //Magic happ...

Hide symbol(s) in Shared Object from LD

I have two third-party libraries occasionally having the same symbol name exported. When the executable is loaded, ld usually picks the wrong one and I getting crash as a result. I cannot do too much about the content of these libraries, so may be there is a way to instruct ld how to find the proper imlementation ? OS - Solaris 10, my p...

ld cannot find an existing library

I am attempting to link an application with g++ on this Debian lenny system. ld is complaining it cannot find specified libraries. The specific example here is ImageMagick, but I am having similar problems with a few other libraries too. I am calling the linker with: g++ -w (..lots of .o files/include directories/etc..) \ -L/usr/lib -l...

Best way of sharing/managing our internal python library between applications

Our company (xyz) is moving a lot of our Flash code to Python. In Flash, we have a shared library between our Flash apps - package xyz. We can make changes to the package without fear of breaking other apps when they are deployed because Flash compiles their code and includes the contents of the library. We deploy the final SWF via RPM,...

Mono - sharing code on client and server . . .

We are trying to come up with our client and server standard and there is a big debate. One school of thought is C# client and java servers using some type of proprietary messsage library to share data objects (think XML like structure . .) The issue with this model is that there is lots of code that needs to be duplicated (validation,...

Linux lib / include organization for cross-compiled libraries?

We are cross-compiling an application for an embedded Linux target under desktop Linux. For testing and other purposes we are using statically linked libraries with our application. The testing library we are using is CMockery. My question is: Where should the static libraries and include files for CMockery live, given that we are cros...

ASP.NET Website's BIN directory and references

Imagine the following solution: -Website ABC.com (not Web Application) -BLL (business logic layer in a seperate assembly) -DTO (dto objects in their own assembly) -DAL (data access layer in it's own assembly as well). The BLL has a reference to the DAL. The BLL has a reference to the DTO layer. The Website project references the BLL. ...