shared-libraries

ELF shared library: relocation offset out of bounds

There is a software package elfutils which includes a program called eu-elflint for checking ELF binaries (just as lint for C - hence the name). Just for curiosity I have checked our own shared libraries with this tool and it found a lot of issues, e.g.: eu-elflint libUtils.so section [ 2] '.dynsym': _DYNAMIC symbol size 0 does not ma...

assembly naming conventions

Assuming you have a namespace that is useful to more than one project in your company, in the format of "MyCompany.Core", would you have an assembly named exactly the same way or just "Core". Why or why not? ...

Convert a Static Library to a Shared Library (create libsome.so from libsome.a): where's my symbols?

the title of this question is an exact dupe, but the answers in that question don't help me. I have a bunch of object files packed in a static library: % g++ -std=c++98 -fpic -g -O1 -c -o foo.o foo.cpp % g++ -std=c++98 -fpic -g -O1 -c -o bar.o bar.cpp % ar -rc libsome.a foo.o bar.o I'd like to generate libsome.so from libsome.a inste...

error while loading shared libraries

Hello! I'm trying to install Code::Blocks from source. There is an `anarchy' folder on my university's CS department's mainframe, where anyone can install anything, basically. wxwidgets is a dependency of Code::Blocks, and I'm trying to put wxGTK, as it's called, into my own folder on `anarchy', which works fine. I then compile Code::...

Linux application - minimize the dependencies

I am trying to minimize the dependencies caused by the shared library mysql++. I know it sounds strange; but I am struggling to solve a platform limitation on Slamd64 ( with 32bit compatibility installed ), where it natively doesn't have certain libraries. I am in a situation where I cannot alter the setup of libmysqlclient due to depend...

How can I link to my own verson of GLib rather than the system installed one?

I have been looking through the source of GLib and GObject and writing programs to use certain features of each. But now I'd like to debug though something in the GLib source code without installing anything on my system. I have a built version of the source code somewhere and I'd like to use those .so files rather than the system inst...

Creating lib with g++ 4.0.1

I'm trying to create a lib with g++ 4.0.1, but it looks for _main (which deliberately isn't in the code). Must I put a _main in there or can I circumvent with some nifty switch? My current command line looks like: g++ -shared -o mylib.so myobj1.o myobj2.o ... On a sidenote I'm using g++ powerpc-apple-darwin9, but I'm guessing/hoping t...

How find absolute address of symbol of shared libraries?

I want to write a little function's tracer. I use ptrace. When I see a CALL instruction, I want to show the function name equivalent to the address call. My tracer work with symbols with absolute address (symbol define in the main binary). But I don't know how I can get the absolute address in virtual memory of the function of the shar...

Telling ld where to look for directories via an environment variable

I'm grading C and C++ files for a class, and this assignment uses the GSL library. Since I don't have root permission on my computer, my GSL library is installed in my home directory, and thus I need to tell compilers and linkers where to find it. This isn't a problem when I write a program myself, because I just add the appropriate -L...

Threadsafe logging inside C++ Shared library

I have implemented multithreaded shared library in C++ (For Linux and Windows). I would like to add logging mechanism inside the library itself. The caller of the library is not aware of that. The log file would be same so i am wondering how could i design the thread safe logging if multiple process is using my library and trying to open...

Detecting / avoiding g++ symbol collisions

Is there a way to detect and avoid if two shared libraries both expose the same global scope symbols? We recently ran into a situation where we had libA.so that exported the SuperCoolMethod() and libB.so that also exposed the SuperCoolMethod() which would clobber the previous copy of said method. This is on Linux using g++ 4.0 and late...

Static library & Dynamic library : Confusion

I need little clarification in this area. I feel that the terms Static library & Dynamic Library are not correct. lib1.o + lib2.o + lib3.o --> "LinkerOutputFile"(executable or library). If this "LinkerOutputFile" contains the code of all the files lib1.o , lib2.o, lib3.o then its said that "LinkerOutputFile" is satically-linked "Linke...

Share a LotusScript library between databases

Is it possible to create a LotusScript library in one database and then access it from another database? Without simply copying the library into each database that needs to use it. What I would like to achieve is a single location where I can update the library and not have to manually copy it over to each database that is using it. I ...

Information To Be Built Into Linux Shared Library

I have two shared libraries in Linux that when built are identical in all ways except that the one function that each exposes has a different interface (one takes in some 3rd-party array types and the other takes in strings). I can build both shared library versions, and I was wondering if there was a way that I can insert meta-informat...

Referencing Assemblies Outside GAC Without Fixing the Path

Hi there, I'm currently in the process of researching the best development and deployment practices for our team. We have a load of similar code that we're going to start importing into a library of shared assemblies for use across our suite of (web & win) applications. I'm starting to get a clear idea of where I think we should be he...

Can i use shared objects with Go (Google) programming language?

Can i use shared objects with Go (Google) programming language? ...

Can I determine which compiler/linker flags where used to create a binary-only shared library ?

I am wondering if there is a way to find out which g++ compiler/linker flags where used in creating a binary-only library. For example there might be a 3rd party shared library (only .h/.so files are there). So I think it would be a good idea to use the same g++ flags when compiling and linking my own application (that is using the bin...

Is it possible to mix static, multi-threaded, DLL libraries in one project?

Is it possible to use distinct libraries A, B, C in the same project in Visual Studio, where A is a static library, B is multi-threaded and C is a multi-threaded DLL? Or do they all have to be the same type for a single .exe output? Edit: Sorry, A is a single-threaded static library. B is a multi-threaded static library, C is a multi-th...

Flex and embbed fonts shared library

Hi , I have a question regarding flex and embed fonts , i want to have a library of embed fonts that will have about 30 different fonts . Is there any way i can only load the fonts that i use? ( dynamicaly ) Thanks ...

Exporting a C++ class from a .SO ( linux )

How can I export whole class to shared library? Is it posible to use THIS library by other languages? ( pascal ) ...