static-linking

How do I prevent export of symbols from statically linked library?

I have created a shared library on linux x86. In creating it, I have statically linked in openssl. OpenSSL is only used internally however I see that the openssl symbols have been exported. This is causing problems for other libraries that need my library AND openssl because the wrong symbol can be loaded at runtime. Is there a way t...

linkning linux static libraries in windows with cygwin

I'm having a binary static library libfoo.a compiled for 32 bit linux machine. I wish to compile it against my win32 project compiled with cygwin. Is that possible? It seems to be possible, as all the object files in the archive should be in the standard ELF format. However I keep recieving linking errors about functions that nm finds ...

Size of static libraries generated by Xcode

I have a project tree in Xcode that looks like this: AppProject depends on ObjcWrapper which in turn depends on PureCppLib. ObjcWrapper and PureCppLib are static library projects. Combined, all sources barely reach 15k lines of code, and, as expected, the size of resulting binary is about 750Kb in release mode and slightly over 1Mb in de...

[Qt] How to get rid of OCI.dll dependency when compiling static

Hi, My application accesses an Oracle database through Qt's QSqlDatabase class. I'm compiling Qt as static for the release build, but I can't seem to be able to get rid of OCI.dll dependency. I'm trying to link against oci.lib (as available in Oracle's Instant Client with SDK). Here's my configure line : configure -qt-libjpeg -qt-zl...

Is it possible to get a delphi project to create a lib file as the output of the project?

I want it to create dll and LIB. because this dll is statically linked to another CPP dll. so I must have the lib file. i'm using the IDE of delphi 4 ...

configure.in: AM_DISABLE_SHARED doesn't change my Makefile

I'm extremely new to using Makefiles and autoconf. I'm using the Camellia image library and trying to statically link my code against their libraries. When I run "make" on the Camellia image library, I get libCamellia.a, .so, .la, and .so.0.0.0 files inside my /usr/local/lib directory. This is the command I use to compile my code with th...

Newbie question: How to create and use static libraries in WINARM?

I'm using WINARM Version 20060606 located here: http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/#winarm I want to create a simple static library as follows: ---- plus.h ------------ int plus(int x, int y); ---- plus.c ------------ #include "plus.h" int plus(int x, int y) { return (x + y); } Then I want to sta...

compiling on Snow Leopard: i686-apple-darwin10-g++-4.0.1: language library.a not recognized

I'm compiling and linking against a library in Snow Leopard. I have never seen an error like it: i686-apple-darwin10-g++-4.2.1: language library.a not recognized I'm compiling an application to link statically with a proprietary library and wxWidget 2.9. Have anyone seen something like this before? ...

How can I compile an autotools project with statically linked dependancies?

There's an open source library I want to use. As I want to spread my software as binary package, I do not want the library to have dependancies on other libraries, so I need to link the dependancies statically. Now as the library is open source and there are no binaries provided, I compile it myself. The library uses autotools, and I di...

My framework will utilise other frameworks, but I'd like this to be transparent to the end-user

I'm building a framework, which aims to provide a new development environment for the user, but I need to use things like RegexKit and almost certainly some other established frameworks in order to do this. Any functionality exposed from such frameworks would be abstracted through classes and methods in my own framework for maintenance ...

Static libpng link with visual studio 2010

Hey guys. I'm trying to add PNG support to my application and thus I want to include libpng. I know it needs zlib and thus I downloaded that as well. I went into the png folder/projects/vstudio and I opened the solution. I compiled it and it went just fine. I added some headers from it into my application and I copied the lib files. My ...

What does static linking against a library actually do?

Say I had a library called libfoo which contained a class, a few static variables, possibly something with 'C' linkage, and a few other functions. Now I have a main program which looks like this: int main() { return 5+5; } When I compile and link this, I link against libfoo. Will this have any effect? Will my executable increase ...

Attaching a static library to an iphone/ipad application

Hello, which is the best approach to include a static library with into an application for iPhone or iPad? I could choose to compile the library supplying right platform and building a library file with the ar utility and then add as a framework to the project including the source of the library .c/.h and compile them together with th...

Statically linked libraries not running code inside to setup static variables.

In a c++ project I am working on, I have a simple c++ file that needs to run some code at the beginning of the program execution. This file is linked into a static library, which is then linked into the main program. I have similar code in other files running fine, that looks something like: bool ____nonexistent_value = executeAction(...

exectuable dependancies on libraries

When sharing an executable do i really need to worry about libraries used to make that executable? seems like that should be taken into consideration when generating the exe not when you have to run it. Just curious. I am pretty sure I don't have to worry but wanted to ask this question to make sure. better to be safe than sorry. ...

How do I statically link sqlite to my android application?

I need to statically link the 3.6.2 version of SQLite against my android application due to a bug that affects the dynamic library bundled with Android < 2.2. I've already compiled and installed 3.6.2 on my development machine, but I'm not sure how I go about linking it to my Android app (developing with Eclipse). I'm not familiar with ...

Why are static X11 apps failing on other machines?

I built X11R5 libs statically on a 32-bit Fedora Core 9 machine. Then I built an app which uses X11 and linked it statically. So far, so good. ldd reports it's a statically-linked app. I can run it locally just fine. But when I copy it over to a 64-bit FC9 machine, it fails as follows: assistant.static: xcb_io.c:228: _XSend: Assertion `...

Why is my static library so huge?

I have a C++ compiled static library of about 15 classes and their member functions and stuff, and compiled, it's almost 14 megabytes. It links to Google's dense hash table library and MPIR, which is like GMP for Windows, but I did that in a plain exe and it was a few kilobytes. Why is it so massive? What can I do to reduce its size? It ...

Static linking GLU?

I'm using GLUTess to tesselate polygons. After several tests, I realized glu32.lib which links to glu32.dll, crashes every once in a while. Whereas GLU which I got from the opengl sdk, is solid as a rock. Unfortunately though, by not linking to the windows dll, this means I need to drag around GLU.dll with my app instead of relying on Wi...

Convert a dll to a lib for static linking?

Is there a free way to statically link a dll? I've tried dll to lib but $999 is too expensive. What are alternatives since I want to have 1 nice exe instead of 1 exe + 1 DLL. Thanks ...