static-libraries

How should platform specific lib files be named?

Hello, I'm working on a C++ project that produces a lib that other teams use. It's being produced in a few different flavours: Win32 Debug Dynamic Win32 Debug Static Win32 Release Dynamic Win32 Release Static x64 Debug Dynamic x64 Debug Static x64 Release Dynamic x64 Release Static I'm wondering what the best wisdom is on how to nam...

Visual C++ 9.0 (2008) Static Lib + Boost Library = Large .lib File

I have a Visual Studio 2008 C++ project that outputs a static library and uses some functionality of the Boost Library. When I build the project in Debug configuration, the .lib file is 7.84 MB. When I build the project in Release configuration, the .lib file is 23.5 MB. !!!! The only Boost headers I include are: boost/function.hpp...

How can I link glibc statically with qt

I have built a static version of qt and download a static version of glibc. Now I would like to link glibc statically to my qt application. I know about going into the .pro and adding the line LIBS += -L path/to/static_lib but I am wondering if these that is enough? Will it still link glibc statically even though the OS I am building...

what is the oldest glib version that a qt 4.6 application can run with

I am trying to build a standalone qt application (built on ubuntu and deployed on Red Hat 5.3, both 64 bits) after building a qt application that is statically linked to the qt library I tried to run the program on red hat and got an error saying libc.so.6 was not found and that GLIBC_2.9 or GLIBC_2.10 is not installed and needed. I tr...

VC6 linking conflict

I have an old c++ project compiled with VC6. I need to statically link a new library to implement a new functionality. Unfortunately the new library define a symbol (i.e. _inflate) that is already defined in a previously linked static library. Of course I cannot get rid of either library, and of course I have no access to the library'...

Statically compiling QWebKit 4.6.2

I tried to compile Qt+Webkit statically with MS VS 2008 and this worked. C:\Qt\4.6.2>configure -release -static -opensource -no-fast -no-exceptions -no-accessibility -no-rtti -no-stl -no-opengl -no-openvg -no-incredibuild-xge -no-style-plastique -no-style-cleanlooks -no-style-motif -no-style-cde -no-style-windowsce -no-style-windowsmobi...

How to use libraries compiled with MingW in MSVC?

Hello, I have compiled several libraries with MingW/MSYS... the generated static libraries are always .a files. When I try to link the library with a MSVC project, Visual Studio throws 'unresolved external symbols' ... It means that the .a static library is incompatible with MS C++ Linker. I presume it has to be converted to a MSVC comp...

How to force link a static library to another using .vsprops, if possible?

Environment: VS 2008 in Windows. Problem: A static library, say first.lib is not linked to, say second.lib, if first.lib is specified in .vsprops file and none of its functions is referenced in the second.lib. If, however, first.lib is removed from the .vsprops file and placed instead in the appropriate project options dialog(1), it is...

Creating and using a static lib in xcode

I am trying to create a static library in xcode and link to that static library from another program. So as a test i have created a BSD static C library project and just added the following code: //Test.h int testFunction(); //Test.cpp #include "Test.h" int testFunction() { return 12; } This compiles fine and create a .a file (li...

find out what functions a static C library has

hi, I have a static C library (say mylib.a) and I was wondering if it's possible to find out what functions are implemented inside that file. I don't have a corresponding header file. what I need is like the equivalent of javap for Java. ...

Objective-C categories in static library

Can you guide me how to properly link static library to iphone project. I use staic library project added to app project as direct dependency (target -> general -> direct dependecies) and all works OK, but categories. A category defined in static library is not working in app. So my question is how to add static library with some categ...

How to convert a dynamic dll to static lib?

I write a program helloworld.exe; it depends on a.dll. I don't have the source code of the a.dll, which is a dynamic dll. How can i change it to static library, so I can link it into helloworld.exe? ...

Iphone Link Static Library

Hi All, I have created a static library in XCode called TestLib. I then created a simple test project that will use this library. I dragged the TestLib xcode project into my test project (frameworks section - if it matters), and set TestLib as a direct dependency of the test project. I am having trouble importing header files from the ...

Static library woes in iPhone 3.x with categories and C libraries

I have a static library (let's call it S) that uses a category (NSData+Base64 from MGTwitterEngine) and a C library (MiniZip wrapped by ZipArchive, a mm file). This static library is used in an iPhone 3.x project (let's call it A). To be able to use the MiniZip library I included its files in project A as well as the static library S. I...

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

Finding undefined symbols in windows static lib

Is there any way to find out the list of undefined symbols in windows static library compiled using VC6? I know the nm command will list all the symbols in linux and symbols with a tag of "U" can be identified as undefined. But, how to do it Windows? ...

Visual Studio - Static Library Compatibility (2008, 2010)

I have a product that I ship with static libraries for use by third party integrators. I have seen compatibility problems with other versions of VS so I was wondering if there is any info about library compatibility from 08 to 10 and vice versa? This is with Standard Windows Libraries (no mfc) and not ATL. ...

static library, but I still need headers?

Hi All, I have a bunch of projects that all could share a "common" static library of classes. What confuses me is if I make a static library out of these classes and link against it in my projects that I still need the headers of the classes in the static library in my main projects. What is the benefit of the static library then? H...

XCode vs VS2008 or how to work with a static library project on XCode

Hello. I've working with Visual Studio for a long time and now I'm working with XCode. On Visual Studio I can work with more than one project at the same time adding them to a solution (imagine a solutin with a windows application project and a library project). Now I have XCode and two projects: an iPhone application and a static lib...

c++ undefined references with static library

hi guys i'm trying to make a static library from a class but when trying to use it i always get errors with undefined references on anything. the way i proceeded was creating the object file like g++ -c myClass.cpp -o myClass.o and then packing it with ar rcs myClass.lib myClass.o there is something i'm obviously missing generaly...