shared-libraries

Is there any way to use StaticResource in a WPF control library and be able to view at design-time?

≡放荡痞女 提交于 2020-01-11 21:31:09
问题 I have a WPF Control Library that is being added to a windows forms application. We want to allow the controls to be localizable, however I am not sure how to FULLY accomplish this without duplicating code. This is what I am doing now. Basically, in the windows forms app, before the main application kicks off, I am instantiating an App.xaml that live within the forms app (containing my links to my resources that also live within the forms app). This works perfectly for runtime. However, my

error while loading shared libraries: libncurses.so.5:

喜欢而已 提交于 2020-01-11 18:41:31
问题 I've installed Android Studio and tried to run my first project in it, and I've got following error: Error Output was: /home/user/android-studio/sdk/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory I've already tried to run sudo ldconfig but it doesnt help. I've recently installed libncurses (before using android studio). What should I do? 回答1: If you are absolutely sure that libncurses, aka ncurses, is

Embed all external references when creating a static library

扶醉桌前 提交于 2020-01-11 13:20:06
问题 I need to create a wrapper library for C code that wraps my C++ library. Is there a way to create that wrapper library in such a way, that the user needs to link only this wrapper library and doesn't have to include all the (C++) libraries on the linker command line as well? The structure of my test project looks like this: . ├── lib │ ├── cpp │ │ ├── print.cc │ │ └── print.h │ ├── lib.cc │ ├── lib.h └── main.c The main.c is an example C application that uses my library. The lib.h and lib.cc

dlclose gets implicitly called

前提是你 提交于 2020-01-11 13:09:31
问题 So I was studying about shared libraries and I read that an implicit dlclose() is performed upon process termination. I want to know who is responsible for this call. For example, if I wrote: #include <stdio.h> int main() { printf("Hello World\n"); return 0; } And then if I did ldd ./a.out then I get a list of these libraries: linux-vdso.so.1 => (0x00007ffd6675c000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2569866000) /lib64/ld-linux-x86-64.so.2 (0x0000562b69162000) Linker is

Why would the ELF header of a shared library specify Linux as the OSABI?

微笑、不失礼 提交于 2020-01-11 08:19:11
问题 All the standard shared libraries on my Linux system (Fedora 9) specify ELFOSABI_NONE (0) as their OSABI. This is fine - however I've received a shared library from a supplier where the OSABI given in the ELF header is ELFOSABI_LINUX (3). This doesn't sound like an unreasonable value for a shared library intended for a Linux system, however it is a different value to that of all my other libraries - and so when I try to open this library, with dlopen(), from one of my other libraries this

Using Intellij + Maven to import libraries: Cannot resolve symbol

回眸只為那壹抹淺笑 提交于 2020-01-11 06:03:07
问题 I have imported a library (JBox2D) using Maven in IntelliJ 13, for use in an android project. Maven didn't give me any error messages, so I assume the library was imported correctly. However, as soon as I try use a class from the library, I get "Cannot resolve symbol". IntelliJ doesn't offer the option of adding an import statement, as it normally does. How should I proceed? 回答1: Open the maven window and hit the reimport button (it's usually the first one on the toolbar). This will force

Debugging shared libraries remotely with gdb/gdbserver

六眼飞鱼酱① 提交于 2020-01-11 05:31:08
问题 My question is about remote debugging an application on an embedded arm processor using gdb/gdbserver. I can debug the application itself, but the application dynamically links to a shared library which implements an in house communications protocol. I want to be able to set breakpoints within the shared library functions so try to figure out some device discovery problems. I have made sure that the library is compiled with debug symbols and is loaded by gdb on the host side, I can list

Calling GSL function inside a class in a shared library

谁都会走 提交于 2020-01-10 04:43:06
问题 I'm trying make a shared library in c++ implementing tools for Fermi gases. I'm using the GSL library to solve a function numerically and my code runs without a problem without when running as a script, but when trying to convert it to a shared library and classes I encounter problems. I've seen similar questions: Q1 Q2 Q3 I'm fairly new to c++-programming and cannot seem to adapt the different answers to my problem. Probably since I do not quite understand the answers. My code is: /* Define

How to do runtime binding based on CPU capabilities on linux

[亡魂溺海] 提交于 2020-01-09 19:16:00
问题 Is it possible to have a linux library (e.g. "libloader.so") load another library to resolve any external symbols? I've got a whole bunch of code that gets conditionally compiled for the SIMD level to be supported ( SSE2, AVX, AVX2 ). This works fine if the build platform is the same as the runtime platform. But it hinders reuse across different processor generations. One thought is to have executable which calls function link to libloader.so that does not directly implement function . Rather

How to do runtime binding based on CPU capabilities on linux

痴心易碎 提交于 2020-01-09 19:15:29
问题 Is it possible to have a linux library (e.g. "libloader.so") load another library to resolve any external symbols? I've got a whole bunch of code that gets conditionally compiled for the SIMD level to be supported ( SSE2, AVX, AVX2 ). This works fine if the build platform is the same as the runtime platform. But it hinders reuse across different processor generations. One thought is to have executable which calls function link to libloader.so that does not directly implement function . Rather