shared-libraries

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

Linking a shared library against a static library: must the static library be compiled differently than if an application were linking it?

At least on Linux and Solaris, static libraries are really just a bunch of compiled .o's tossed into one big compressed file. When compiling a static library, usually the -fpic flag is ommited, so the generated code is position dependent. Now say my static library is B. I've built it and have the resulting .a file which is really just ...

How do I use waf to build a shared library?

I want to build a shared library using waf as it looks much easier and less cluttered than GNU autotools. I actually have several questions so far related to the wscript I've started to write: VERSION='0.0.1' APPNAME='libmylib' srcdir = '.' blddir = 'build' def set_options(opt): opt.tool_options('compiler_cc') pass def configure(c...

DLL Injection/IPC question

I'm work on a build tool that launches thousands of processes (compiles, links etc). It also distributes executables to remote machines so that the build can be run accross 100s of slave machines. I'm implementing DLL injection to monitor the child processes of my build process so that I can see that they opened/closed the resources I ...

linux dlopen: can a library be "notified" when it is loaded?

Is there a way for a shared library to be "notified" when it is loaded? In other words, let's say I use dlopen on a shared library, is there a function that is automatically called (if present) on the shared library (e.g. main?) ...

Document Library : Sub folder --> target audience

Hello Sharepoint GURU, I have a following requirement. I have a document structure where I would like to grant read only permission to specific group on sub folder within document library. I am using Sharepoint 2007 Example. Folder : Business <--- Document Library under business I have two sub folder. ---> 2009 --> Sub F...

Easy check for unresolved symbols in shared libraries?

I am writing a fairly large C++ shared-object library, and have run into a small issue that makes debugging a pain: If I define a function/method in a header file, and forget to create a stub for it (during development), since I am building as a shared object library rather than an executable, no errors appear at compile-time telling me...

ld: linker error

ld: foo.o: relocation R_X86_64_PC32 against undefined symbol `bar' can not be used when making a shared object; recompile with -fPIC I recompile with -fPIC and it still produces this error. ...

NOT sharing all classes with shared library

As ugly as win32 Microsoft compiler is by using the __declspec macro, it does have the advantage of being explicit about what you want to export or not. Moving the same code onto a Linux gnu/gcc system now means all classes are exported!(?) Is this really true? Is there a way to NOT export a class within a shared library under gcc? #...

Converting .DLL to .SO

Hello, Can any one of you help me in converting an windows dll file in a .so file. ...

Python library path

I have a python file "testHTTPAuth.py" which uses module deliciousapi and is kept in "deliciousapi.py". I have kept the files like testHTTPAuth.py lib deliciousapi.py But when i run: "python testHTTPAuth.py" it's giving error import deliciousapi ImportError: No module named deliciousapi How can handle these python librari...

Break out shared model in code igniter applications

Hi, I'm fairly new to code igniter and to php (coming from a java background). I want to create a model that's shared by three apps that may or may not run on the same machine. So I want to keep the model classes portable to be shared by all three and easily handled by SCM systems. So my thought was to do the following: If I have alrea...

How to link against libxerces-c.so.28?

Whenever we specify -lxerces-c, this looks for libxerces-c.so library in the LIBPATH. Q1. Why are lib files then generated as libxerces-c.so.28? Q2. How should we link against such libraries? The only way I can think of is create a soft link libxerces-c.so which links to the file libxerces-c.so.28. I feel this as an overhead to do. ...

library path when dynamically loaded?

How can I get the path of the shared library from within the library itself? In other words, let's say that library X is loaded using dlopen(), how can I get access to the path that was used to load the said library from within the library itself? Note that I cannot have the agent that loaded the library in the first place hand me this...

How to initialize a shared library on Linux

Hi there, I am developing a shared library using c++ under Linux. I would like to user log4cxx for logging purposes. However, I'm not sure how to initialize this. For log4cxx I need to create a logger object. How can I make sure this object is created when my library is loaded? I suspect that it will be easiest to create the logger obj...

Debugging shared libraries remotely with gdb/gdbserver

My question is about remote debugging an application on an embedded arm processor using gdb/gdbserver. I can debug the application itself, but the application dynamically links to a shared library which implements an in house communications protocol. I want to be able to set breakpoints within the shared library functions so try to fig...

What is the difference between a .sl and a .so on HPUX?

Since you can link your application to a .sl file and a .so file what exactly are the differences between .so and .sl files? ...

Compiling a shared library with Qt on Ubuntu 9.10

I am new to both Qt and Linux C++ development (although I have many years C and C++ development experience on Windows). I have some legacy C projects (source files and headers - [not using Qt]) that I want to compile into shared libs on Linux. I am proposing to store my projects under the following structure: /home/username/Projects/p...

How do shared libraries work in a mixed 64bit/32bit system?

Good morning, on a 64bit RedHat box we have to compile and run a 32bit application. Meanwhile I managed to compile the gcc version needed (4.0.3) and all required runtime libraries in 32bit and have set the LD_LIBRARY_PATH to point to the 32bit versions, but now during the remaining build process, a small java program needs to be execut...

Dynamic shared library loading framework

I am working with a legacy C library that can be extended by writing user defined function(s) and then recompiling the source. I want to avoid the compilation requirement, and instead extend it ONCE with a function (see pseudocode below): This function will be implemented like this: VARIANT_TYPE CallSharedLibFunction(const char* librar...