static-libraries

Including objects to a shared library from a C++ archive (.a)

痞子三分冷 提交于 2019-12-04 10:35:03
I am trying to include some object files into a shared library I am building. Take the following command (things in [ETC] have been omitted for brevity): /usr/bin/c++ -fPIC -std=c++14 -pthread -Iinclude/ext/liveMedia -Iinclude/ext/groupsock [ETC] -g -shared -Wl,-soname,libValkka.so -o lib/libValkka.so CMakeFiles/Valkka.dir/src/avthread.cpp.o CMakeFiles/Valkka.dir/src/opengl.cpp.o [ETC] CMakeFiles/Valkka.dir/src/decoders.cpp.o -lX11 -lGLEW -lGLU -lGL -Wl,--whole-archive lib/libavcodec.a -Wl,--no-whole-archive So basically I am just creating a shared library where most of the objects come from

Static linking with a Qt project

你离开我真会死。 提交于 2019-12-04 10:09:01
I've got a Qt project I've built in Visual Studio 2010 Professional. However, when I run it (in either Debug or Release mode) it asks for a few Qt dll's. It works if I supply the dll's and throw them into System32, but my question is, how do I make it so that all libraries are included in the .exe? I have all of the static libraries I need, I just don't know how to make it so that the app doesn't ask the end user for them. Cody Gray The correct way is to create a setup program that installs the Qt libraries along with your application. Visual Studio comes with a setup project template that you

dlopen a dynamic library from a static library, when the dynamic library uses symbols of the static one

北慕城南 提交于 2019-12-04 09:56:58
This question is closely related to dlopen a dynamic library from a static library linux C++ , but contains a further complication (and uses C++ instead of C): I have an application that links against a static library (.a) and that library uses the dlopen function to load dynamic libraries (.so). In addition, the dynamic libraries call functions defined in the static one. Is there a way to compile this without linking the dynamic libraries against the static one or vice versa? Here comes what I tried so far, slightly modifying the example from the related question: app.cpp: #include "staticlib

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

萝らか妹 提交于 2019-12-04 08:59:09
问题 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

Library for unrestricted heap memory for bitmaps using NDK on Android [closed]

时光总嘲笑我的痴心妄想 提交于 2019-12-04 08:44:17
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . By design, Android apps are very limited in the amount of heap memory they can use. The limitation for SDK apps is as little as 16MB on old devices. This design choice usually makes sense because the OS tries to support multi-tasking on devices which are usually very low on memory - so each task gets its own small ration. The memory limitation varies per device. On stock Samsung Galaxy S2 for example

Add .so and .a libraries to Makefile

蓝咒 提交于 2019-12-04 07:59:44
问题 I have a makefile which looks like this . DEFINES=-std=c++0x INCS_GTK=-I/usr/include/gtk-2.0 -I/usr/include/glib-2.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gtk-2.0/gdk -I/usr/include/pango-1.0 -I/usr/lib/gtk-2.0/include -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include INCS=-I/usr/include/freetype2 -I/usr/include/mysql -Iframeworks ${INCS_GTK} LDLIBS=-lconfig++ -lcxcore -lcv -lGL -lGLU -lglut -lhighgui

how to link a static library for iOS

无人久伴 提交于 2019-12-04 07:14:01
I have create a bunch of .o files (via gcc -c $file.c $someotherops -o $file.o ). Now I want to link them into a static library. I'm not exactly sure wether I am supposed to use ld or gcc for this. In the ld manual, it is said that I'm not supposed to use it directly. However, I cannot figure out the gcc parameters to create a static library. I tried ld *.o -static -o libfoo.a but it complains about a lot of missing symbols (I think all from libc). I don't understand why it complains because it is supposed to be a static library. I thought it would check for the symbols once I link that static

How can we control bass of music in iPhone sdk? [closed]

这一生的挚爱 提交于 2019-12-04 06:12:05
I want to control the bass of song played by user from iPod music library. I've searched on Google and got some AudioMixer samples which were of no help, but now I have got bass library i.e. libbass.a from http://www.un4seen.com/ which I think is quite useful. But I don't know how I should adjust the bass of the song using slider. Recently I got one more sample regarding this. But here the issue in this sample is I'm getting all equalizer's types like Dance, Pop, Rock, Bass, Jazz, Acoustic, Classical etc preset/predefined in an array given by AudioUnit Framework. But I want implement only bass

Python - Py_Initialize unresolved during compilation

﹥>﹥吖頭↗ 提交于 2019-12-04 05:17:40
I have statically compiled Python2.7 without any error. To test my build, I use the following snippet: #include "Python.h" int main() { Py_Initialize(); } And I am compiling it like this: $ gcc -static -I/path/to/python/header -L/path/to/my/staticpythonlib \ -lpython2.7 -ldl -l_all_other_needed_lib /tmp/my_previous_snippet.c -o myouput However, an error occured. gcc claims the famous undefined reference . test.c:(.text+0x1): Undefined reference to 'Py_Initialize' Curiously I used gcc with the verbosity flag (I won't paste the result here) and the compiler says, it's using my libpython, but

dynamically-sized text object with a copy constructor, a trivial assignment operator, and a trivial destructor

混江龙づ霸主 提交于 2019-12-04 05:12:23
问题 I've been shown that a std::string cannot be inserted into a boost::lockfree::queue . boost::lockfree::queue is too valuable to abandon, so I think I could use very large, fixed length char s to pass the data according to the requirements (assuming that even satifies since I'm having trouble learning about how to satisfy these requirements), but that will eat up memory if I want large messages. Does a dynamically-sized text object with a copy constructor, a trivial assignment operator, and a