shared-libraries

libipopt.so.1: Cannot open shared object file

心不动则不痛 提交于 2019-12-04 18:04:35
Upon performing the basic installation of Ipopt , I'm able to compile the example they provided in Ipopt-3.12.5/Ipopt/examples/hs071_cpp successfully using the command g++ hs_071_main.cpp hs071_nlp.cpp -I/path/to/build/include/coin -L/path/to/build/lib -lipopt -llapack -lblas -lm -ldl But when I try to run ./a.out , I get the error: error while loading shared libraries: libipopt.so.1: cannot open shared object file: No such file or directory I've defined $LD_LIBRARY_PATH in .bashrc , and I've confirmed that ls $LD_LIBRARY_PATH shows libipopt.so and libipopt.so.l You need to export the

Can a C++ Static Library link to shared library?

送分小仙女□ 提交于 2019-12-04 17:34:56
问题 Say I have a static C++ lib, static.lib and I want to call some functions from a C++ shared lib, say shared.lib. Is it possible? Now assume that I have another shared lib, say shared2.lib which links to static.lib but does not link to shared.lib. Does the linker automatically link shared2.lib to shared.lib in this case? I am using Microsoft Visual Studio 2003. 回答1: Static libraries are not linked. They are just a collection of object files (*.obj or *.o) that are archived together into a

NoClassDefFoundError: android.support.v4.content.LocalBroadcastManager [duplicate]

我与影子孤独终老i 提交于 2019-12-04 17:15:55
This question already has answers here : NoClassDefFoundError: android/support/v4/content/LocalBroadcastManager (7 answers) Closed 6 years ago . i read a lot of topic about this error : E/AndroidRuntime(16097): java.lang.NoClassDefFoundError: android.support.v4.content.LocalBroadcastManager i just link facebook sdk to my project, compil is ok, but with the following code i got the error here is my Java Build Path : http://i.stack.imgur.com/GzqO5.png Session.openActiveSession(this, true, new Session.StatusCallback() { // callback when session changes state @Override public void call(Session

Include framework in Xcode static library?

我是研究僧i 提交于 2019-12-04 16:58:54
问题 In short: Is there a way to create a static library in Xcode such that when clients link with that library, they also link with the frameworks upon which that library depends? The problem: We have a shared Xcode project which contains multiple static library targets containing all of our common code. E.g., If a project wants to use the shared networking code, all they should have to do is link in our Network library. The problem is that the libraries don't seem to "include" the frameworks on

Alternative id generators for types

孤人 提交于 2019-12-04 16:29:28
问题 In a project of mine, I have an ID generator for types that looks similar to this: class Family { static std::size_t identifier; template<typename...> static std::size_t family() { static const std::size_t value = identifier++; return value; } public: template<typename... Type> inline static std::size_t type() { return family<std::decay_t<Type>...>(); } }; std::size_t Family::identifier{}; Usage: const auto id = Family::type<FooBar>(); It works just fine for my purposes, but it has some

How to resolve Undefined Symbols error?

☆樱花仙子☆ 提交于 2019-12-04 16:19:14
I'm getting this error Undefined symbols: ".objc_class_name_MyClass", referenced from: literal-pointer@__OBJC@__cls_refs@MyClass in infoViewController.o ld: symbol(s) not found collect2: ld returned 1 exit status When referencing the static method below: [MyClass ClickComment:self.navigationController]; MyClass is defined in a static library that I'm referencing in my app project. When I start typing "[MyClass "..., I get message hints. The app project knows MyClass exist and which methods are defined on it. Yet, I get the above error. Commenting out this call allows the project to build

ldd can't find library in LD_LIBRARY_PATH

时光怂恿深爱的人放手 提交于 2019-12-04 16:19:02
问题 I'm trying to get a system up and running, and am having problems with the OpenMotif shared libraries. I have their directory in LD_LIBRARY_PATH, but it still can't find them. Here's an example: [root@intrepid netcool]# ldd /opt/netcool/omnibus/platform/linux2x86/bin/nco_* |grep 'not found' libXm.so.3 => not found libXpm.so.4 => not found libXm.so.3 => not found libXm.so.3 => not found libXpm.so.4 => not found libXm.so.3 => not found libXm.so.3 => not found libXm.so.3 => not found libXm.so.3

Can I make shared library constructors execute before relocations?

风流意气都作罢 提交于 2019-12-04 14:54:45
Background : I'm trying to implement a system like that described in this previous answer . In short, I have an application that links against a shared library (on Linux at present). I would like that shared library to switch between multiple implementations at runtime (for instance, based on whether the host CPU supports a certain instruction set). In its simplest case, I have three distinct shared library files: libtest.so : This is the "vanilla" version of the library that will be used as a fallback case. libtest_variant.so : This is the "optimized" variant of the library that I would like

Using FFmpeg without NDK in android

时光毁灭记忆、已成空白 提交于 2019-12-04 14:53:26
问题 I go though many site and search regarding " FFMPEG " implementation for android project. Most solution founded are using NDK. but i want to use FFmpeg without using NDK as i found in This Link 回答1: I have used this project https://github.com/guardianproject/android-ffmpeg-java It has already compiled for android version of FFMPEG library and this file will be in res/raw folder (you can update this file if you need newer version). You need to add this project as a library to your's. And after

MonoDevelop and libpjsipDll.so library on Ubuntu. System.DllNotFoundException

孤街浪徒 提交于 2019-12-04 14:36:22
i am trying to use a dll for Linux called: libpjsipDll_v44.so I got it from here http://code.google.com/p/sipeksdk/downloads/list It's a port for Linux of the http://www.pjsip.org/ is a VOIP library This site claims that is posible to use the library in Linux https://sites.google.com/site/sipekvoip/Home/documentation/pjsipwrapper/pjsipwrapper-for-linux The code in MonoDevelop 4.0.12 with C# the code is like this: internal const string PJSIP_DLL = "libpjsipDll.so"; [DllImportAttribute(PJSIP_DLL, EntryPoint = "onRegStateCallback")] private static extern int onRegStateCallback(OnRegStateChanged