static-libraries

MinGW creating dll.a files ? What type of library files are those?

江枫思渺然 提交于 2019-12-03 02:43:38
I am fairly familiar with Windows and Linux libraries compilation but as for today when I have seen MinGW on my Windows machine threw out dll.a and .a files after OpenCV compilation I have started to seriously start thinking. These are my \lib output from OpenCV compilation : 2012-12-21 23:35 1 338 420 libopencv_core243.dll.a 2012-12-21 23:33 224 994 libopencv_core_pch_dephelp.a 2012-12-21 23:38 830 820 libopencv_features2d243.dll.a And my \bin output : 2012-12-21 23:40 356 178 libopencv_perf_core.dll.a 2012-12-21 23:45 362 702 libopencv_perf_features2d.dll.a 2012-12-21 23:35 4 086 052

Force relink when building in QT Creator

和自甴很熟 提交于 2019-12-03 01:41:33
Greetings, I have a subdirs project which wraps a couple libraries and a main application. When I change something in one of the libraries the main application does not relink with them.. does anyone have a trick for getting an application to relink with its statically linked libs automatically when using QT Creator? -Dan O There is a workaround for this and also an interesting discussion on the subject (qmake seems to be the problem here) on the Qt Creator mailing list. The workaround is to add a PRE_TARGETDEPS command to your main applications .pro file, e.g.: PRE_TARGETDEPS += /path/to/your

Android.mk Include other projects

a 夏天 提交于 2019-12-03 00:48:21
Explanations The goal of my question is to know how to create a Android.mk (makefile) that can build and run, this structures of project below. Library (is library on eclipse) [/data/projectLibrary/] Project (Interface) Contains 1 statics libraries (lib1.jar) Depend of Library above [/data/projectUI/] Project (Service) Contains 2 statics libraries (lib1.jar, lib2.jar) [/data/projectService/] Questions I should have one Android.mk for each "project"? Or i should have one Android.mk that includes all the other "projects"? Android MK (Service) LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS)

Initializing qt resources embedded in static library

安稳与你 提交于 2019-12-02 23:20:59
I have next situation: I need to create widget in standalone static library, which then will be linked with final application (visual c++ 9.0, qt 4.5). This static widget library contains some resources (icons), and consist of a several .cpp files (each contains standalone widget). As far as I know, i must initialize qt resource system, if i use them (resources) in static library, with call to "Q_INIT_RESOURCE( resource_file_name )". I solved this with next code (in every .cpp file in static library): #include <QAbstractButton> namespace { struct StaticLibInitializer { StaticLibInitializer() {

What are best practices to decrease the size of static libraries in objective-c?

可紊 提交于 2019-12-02 23:10:21
In building an objective-c static library, I noticed that the .a file (fat file from simulator and iPhone) is quite large. In particular, it was originally 5.7mb. I found this post and set my build settings Generate Debug Symbols to No, decreasing the lib size to 1.7mb. This was a big improvement, but is there anything else that can be done? The implementation and header files alone take up ~100kb. In case it's part of your concern, a static library is just the relevant .o files archived together plus some bookkeeping. So a 1.7mb static library — even if the code within it is the entire 1.7mb

glu.h PROBLEMS!

孤街浪徒 提交于 2019-12-02 22:33:34
问题 Ok so im setting up Visual studios C++ 10 on Windows 7 so i can run the sample progams from this book "OpenGL superbible 5th edition" but i'm having some MAJOR ISSUES, in getting GLTools and freeglut to wok: Here's how I set everything up so far......................... fist followed these steps i got online: first youl want to download glut or freeglut, then unzip it ofc. - I got this from the zip file at http://www.starstonesoftware.com/OpenGL/ In the freeglut folder there should be a

Localization of strings in static lib

早过忘川 提交于 2019-12-02 20:49:25
I have a project that uses a static library (SL). In that SL, there are a couple of strings I'd like to localize and the project includes all of the localization files. The localization works just fine when storing all text translations in the same file. The thing is that I'd like to separate the SL strings from the other strings. I have tried to put two different *.strings files (Localizable.strings and Localizable2.strings) in the language folder of interest but that did not work. I have also tried to use two *.strings file with the same name (Localizable.strings) but with different paths.

Link a static library to a shared one during build?

笑着哭i 提交于 2019-12-02 20:48:37
I have a problem building a shared library with GCC/Linux. Currently this shared library is created with GCC/libtool option "-shared" and everything is fine. Now there are two additional, static libraries (.a-files) that have to be added to this shared one since they provide some functionality that is required by the shared one. Adding these static libraries with option "-l" does not help, afterwards they are not part of the .so file. So how can I force GCC/libtool to really add the code of these static libraries to the shared library? Thanks! Dmitry Yudakov You need --whole-archive linker

How to avoid #include dependency to external library

送分小仙女□ 提交于 2019-12-02 20:47:05
If I'm creating a static library with a header file such as this: // Myfile.h #include "SomeHeaderFile.h" // External library Class MyClass { // My code }; Within my own project I can tell the compiler (in my case, Visual Studio) where to look for SomeHeaderFile.h. However, I don't want my users to be concerned with this - they should be able to include my header without having to inform their compiler about the location of SomeHeaderFile.h. How is this type of situation normally handled? This is a classic "compilation firewall" scenario. There are two simple solutions to do: Forward-declare

Stable way to embed open-source code into static library in iOS?

本秂侑毒 提交于 2019-12-02 20:29:36
问题 I'm making a static library for distribution for other developers. In other words, a kind of API. And I have to use bunch of open-source libraries like SBJSON , ASIHTTPRequest . I think it'll make an name conflict problem if I embed these classes into my library at source level. As I know, Objective-C runtime doesn't support private classes. So it there a way to include those classes into my library without name conflict? 回答1: Just don't! Simply tell your users that they shall link SBJSON or