shared-libraries

Compiler libstdc++ version vs. system version

别说谁变了你拦得住时间么 提交于 2019-12-03 13:10:31
问题 I'm trying to understand how g++ selects which version of libstdc++ it links against and what it means when the "system" version of the library is different. I'm using gcc/g++ 4.1.2, which according to the ABI Guidelines doc, includes libstdc++.so.6.0.8, and sure enough: -rwxr-xr-x 1 root root 4397810 May 18 2007 /opt/gcc4.1.2/lib/libstdc++.so.6.0.8 Based on my understanding of the ABI forward-compatibility, I can build with g++ 4.1.2 and expect the code to run on a system with a later

Configure and Build OpenCV to Custom FFMPEG Install

狂风中的少年 提交于 2019-12-03 12:49:30
问题 I cannot seem to configure OpenCV to link to a non-/usr/lib set of FFMPEG libraries. My LD_LIBRARY_PATH contains a direct link to the folder for the custom install of FFMPEG: LD_LIBRARY_PATH=/pathto/ffmpeg-0.10.2/lib Additionally, I've configured pkgconfig as: PKG_CONFIG_PATH=/samepathto/ffmpeg-0.10.2/lib/pkgconfig/ Within CMake however I cannot find any setting for path to FFMPEG - either in basic or custom. The only setting related to FFMPEG appears to be WITH_FFMPEG type setting (set to ON

What is the meaning of “Warning: Linking the shared library against static library is not portable”?

半腔热情 提交于 2019-12-03 12:48:37
I am making one dynamic library by using some function of libmxml.a library but I get this warning: *Warning: Linking the shared library libgstmatroskademux.la against the _ *static library /home/Mr32/gst-template4_final/gst-plugin/src/libmxml.a _ is not portable! I also get this warning: gcc: /home/Mr32/gst-template4_final/gst-plugin/src/libmxml.a: linker _ input file unused because linking not done So what's the meaning of this warning and how could I solve it? Edit : There is one already autogenerated make file for compiling the gstreamer plugin. Now to use some function of libmxml.a in

Hide symbol(s) in Shared Object from LD

会有一股神秘感。 提交于 2019-12-03 12:47:13
I have two third-party libraries occasionally having the same symbol name exported. When the executable is loaded, ld usually picks the wrong one and I getting crash as a result. I cannot do too much about the content of these libraries, so may be there is a way to instruct ld how to find the proper imlementation ? OS - Solaris 10, my program is built by autoconf/autotools/gcc, conflicting libraries are libclntsh (part of Oracle driver) and OpenLDAP. Unfortuinately, I cannot use Oracle's implementation of LDAP client - it lacks many features OpenLDAP has. Edited: The linkage is as following:

Compile a shared library statically

谁都会走 提交于 2019-12-03 12:44:45
I've got a shared library with some homemade functions, which I compile into my other programs, but I have to link the end program with all the libraries I have used to compile the static library. Here is an example: I have function foo in the library which requires a function from another library libbar.so . In my main program to use function foo I have to compile it with the -lbar flag. Is there a way I can compile my library statically so it includes all the required code from the other libraries, and I can compile my end program without needing the -lbar flag? Shared objects (.so) aren't

How to compile shared lib with clang on osx

主宰稳场 提交于 2019-12-03 12:38:53
问题 source file rsetti::fastidio { /tmp }-> cat foo.c #include <stdio.h> void ACFunction() { printf("ACFunction()\n"); AGoFunction(); } compilation of shared lib rsetti::fastidio { /tmp }-> clang -shared -o libfoo.so foo.c foo.c:4:3: warning: implicit declaration of function 'AGoFunction' is invalid in C99 [-Wimplicit-function-declaration] AGoFunction(); ^ 1 warning generated. Undefined symbols for architecture x86_64: "_AGoFunction", referenced from: _ACFunction in foo-lFDQ4g.o ld: symbol(s) not

symbol lookup error: ./executableName: undefined symbol: _ZN18QXmlDefaultHandlerC2Ev

独自空忆成欢 提交于 2019-12-03 12:34:35
I am trying to run an executable on Linux Mint 16 x64 that was compiled for Ubuntu 12 x64. The executable uses Qt 5.1.1 dynamically during runtime. I get the error: loaded the dummy plugin loaded the Linux plugin updating server status ./executableName: symbol lookup error: ./executableName: undefined symbol: _ZN18QXmlDefaultHandlerC2Ev When I run ldd executableName | grep "not found" searching for missing dependencies I get no result; all dynamic dependencies seem to be found, but the undefined symbol error above persists. Thoughts? A quick help: $ echo _ZN18QXmlDefaultHandlerC2Ev|c++filt

STL and release/debug library mess

怎甘沉沦 提交于 2019-12-03 12:30:09
问题 I'm using some 3rd party. I'm using it's shared library version, since the library is big (~60MB) and is used by several applications. Is there a way at application startup to find out that release/debug version of library is used respectively for release/debug version of my application? Longer description The library which exposes C++ interface. One of API methods return std::vector<std::string> . The problem when I compile my application in debug mode, debug version of the library should be

How to create nautilus C extensions

风流意气都作罢 提交于 2019-12-03 12:29:36
问题 I'm trying to create a Nautilus extension in C, but there are just Python examples and helps. Almost no documentation and literally no examples, but just some complete extensions which are long and hard to understand for a beginner. I need just a simple sample code that creates a new column in Nautilus's list view. How to write and compile it. The code I've tried is: #include <libnautilus-extension/nautilus-column-provider.h> typedef struct _FooExtension FooExtension; typedef struct

How to build Flutter project with Android aar file?

人走茶凉 提交于 2019-12-03 12:27:46
I want to use Flutter to create an Android app which depends on a third-party SDK that wrapped in an aar file. So far, I have only found the article Accessing Platform and Third-Party Services in Flutter . It seems that I have to build the Flutter project with additional Java files using Android Studio . This is complicated and not what I want. Is there any way to directly load aar files or *.so files in Dart code? Something like how JNI works. After learning the Flutter example - hello services , I have successfully built my Flutter project with aar file. Basic Steps: Download the Flutter