shared-libraries

Detecting 32 vs. 64-bit Intel CPU on Mac using Autoconf

I am developing an Autoconf script for a project which should run on Linux and Mac, 32- and 64-bit. On Linux, detecting 64-bit is easy: you get x86_64 instead of i386 for build_cpu. I can't figure out how to do it for the Mac: both 32- and 64-bit machines give i386 for the build_cpu. Is there a way to detect the difference using Autoconf...

How to get Netbeans 6.5 shareable libraries working

I created a Web application in Netbeans 6.5. Now I want to use the Joda Time library. I want to share this library via subversion, because I don't want my team mates to be dependend on some Netbeans configuration. Just to get the project working, I first added the library to the Netbeans library (Tools->Library). This worked OK. The JAR...

Shared library terminology

What is the difference between "shared library text" and "shared library data"? Also, what does it mean for shared library data to be "pre-relocated"? This question is in reference to a couple of AIX-specific features involving shared libraries. http://publib.boulder.ibm.com/infocenter/systems/topic/com.ibm.aix.genprogc/doc/genprogc/...

Convert a Static Library to a Shared Library

I have a third-party library which consists mainly of a large number of static (.a) library files. I can compile this into a single .a library file, but I really need it to be a single .so shared library file. Is there any way to convert a static .a file into a shared .so file? Or more generally is there a good way to combine a huge n...

Can someone explain about Linux library naming?

When I create a library on Linux, I use this method: Build: libhelloworld.so.1.0.0 Link: libhelloworld.so.1.0.0 libhelloworld.so Link: libhelloworld.so.1.0.0 libhelloworld.so.1 The versioning is so that if you change the public facing methods, you can build to libhelloworld.so.2.0.0 for example (and leave 1.0.0 where it is), so that ...

What is the best practice for a shared library primary header file in C++?

When I create shared libraries, I have a header file (but with no file name extension) in the root of the library source named the same as the library. So for example, if my library was called libirock.so, then I'd have a file called irock in the project root. This file will include all of the most important headers in the library, so t...

How to debug a shared library using eclipse/gdb on Windows?

At my university we are currently developing a VST-Plugin on Windows using open source tools. My professor is pretty fond of Microsoft Visual Studio and rather sceptic towards open source tools such as Eclipse, GCC, Subclipse etc. However, until now I was able to solve all of his problems and it would be a shame if he could not be con...

Why do I have to define LD_LIBRARY_PATH with an export every time I run my application?

I have some code that uses some shared libraries (c code on gcc). When compiling I have to explicitly define the include and library directories using -I and -L, since they aren't in the standard places. When I try to run the code, I get the following error: ./sync_test ./sync_test: error while loading shared libraries: libsync.so: can...

SQLite disk usage

SQLite has a reputation of being small, fast and flexible. I used it in one of my C++ projects to save simple statistics to a file. Once for 15 minutes 3-5 new simple records (5 rows of integers) were saved into the database. During few weeks of such SQLite usage I quickly observed clearly noticeable disk usage. I wasn't expecting that, ...

Linux, Mono, shared libs and unresolved symbols

I have a shim library (shared, C++) which calls functions in another shared library (libexif) and presents a simple interface to C# for Platform Invoke calls. (That is, a C# program uses PInvoke to call my custom shared library which in turn calls another shared library.) In Windows, my custom shared library links to the shared library ...

linking a shared library using gcc

Hello, I have a shared library (*.so) created using Real View Compiler Tools (RVCT 3.2) on windows target. Then i try to link this *.so file with my application using gcc on linux system. What is the gcc option to link this shared library with my application linux? My question is the option -shared used as gcc -shared myfile.so is u...

Common Lisp: What's the best way to use libraries in a shared hosting environment?

I was thinking about this the other day and wanted to see what the SO community had to say about the subject. As it stands right now Common Lisp is getting some attention as a web development platform, and with good reason (of which I'm sure you are already convinced). I was wondering how one would go about using a library in a shared ...

Why do I have to use LD_PRELOAD for libcl.2 to use XML::LibXML::Common on HP/UX?

A compulsion of LD_PRELOAD on HP platform only and not on other unix flavors (AIX,Linux, and Solaris). I built Perl Module XML::LibXML::Common on all of Unix flavors.I had to specifically do LD_PRELOAD for libcl.2 library on HP Platform only. While on other unix platforms nothing as such was required. Is this an OS behaviour or somethi...

Is it common to build your own applications based on 3rd party libraries?

Not sure if this questions is stupid. But when I was doing some (small) side projects. I always surf the Internet and try to find some 3rd libraries (best free), and then build my own. Some are control extensions such as File System Browser Tree view. Some of these libs are very popular, such as iTextSharp. Some are very niche and are...

save stack in arraylist

I want to know how to save stack in array list? ...

Verifying a release builds

My projects reference static DLLs I've created. These projects are setup to make sure a corresponding build phase occurs. Meaning, if I build in simulator/debug, the static library will have an up to date simulator/debug build. I can verify my app works fine except for device/release. Is there a way to verify device/release? It's so...

How to resolve Undefined Symbols error?

I'm getting this error Undefined symbols: ".objc_class_name_MyClass", referenced from: literal-pointer@__OBJC@__cls_refs@MyClass in infoViewController.o ld: symbol(s) not found collect2: ld returned 1 exit status When referencing the static method below: [MyClass ClickComment:self.navigationController]; MyClass is defined in a st...

Why would shl_load() fail for libraries with Thread Local Storage?

Threads in Perl by default take their own local storage for all variables, to minimise the impact of threads on existing non-thread-aware code. In Perl, a thread-shared variable can be created using an attribute: use threads; use threads::shared; my $localvar; my $sharedvar :shared; HP-UX runtime loader does not support dynamic load ...

LSB AppChecker: GCC links against unused libraries

I'm checking the portability of a shared object (.so) with the LSB AppChecker. One of the problems it reports is that there is one external library (libm.so.6) that is not being used but is linked against anyways. How can I prevent GCC from linking to this unneeded library? EDIT: The output of the ldd command against my shared object i...

Use windows static libraries from java code with minimal effort (prefereably using JNA)

I have to use some static windows library (*.lib) from java code, I can write C++ JNI wrappers, but I'd rather not do it (not that experienced in C++). What would be the easiest (least developement effort) way use it, performance is not important, since that code will just be fetching some data, that most probrably will be worked on on...