shared-libraries

Unable to execute Cython wrapped Python code

。_饼干妹妹 提交于 2019-12-19 21:46:45
问题 I am exporting C++ API for python code using Cython. The application will be executed on Ubuntu. The project files are present here The function I am wrapping, reads the file name of the image and displays the image. The Show_Img.pyx file looks as follows import cv2 cdef public void Print_image(char* name): img = cv2.imread(name) cv2.imshow("Image", img) while(True): if cv2.waitKey(1) & 0xFF == ord('q'): break The c++ interface generated from Cython looks as follows __PYX_EXTERN_C DL_IMPORT

No output when running ltrace

风格不统一 提交于 2019-12-19 20:47:30
问题 As the title says, ltrace does not work properly on my system. It shows no output in most cases, like $ltrace ls [usual ls output] +++ exited (status 0) +++ $gcc hello.c $ltrace ./a.out Hello world! +++ exited (status 0) +++ I'm using the latest ltrace version (from package 0.7.3-5.1ubuntu4 ), I even tried recompiling from source with no difference. I'm using Ubuntu 16.10 , kernel 4.8.0-42-generic . gcc version is 6.2.0 . Weird thing is, binaries downloaded from the Internet seem to work,

Question on DLL Exporting/Importing and Extern on Windows

霸气de小男生 提交于 2019-12-19 19:55:35
问题 Hey guys i have some quick questions on windows dll. Basically i'm using the ifdefs to handle the dllexport and dllimport, my question is actually regarding the placement of the dllexports and dllimports as well as extern keyword. I am putting the dllimports/dllexports on the header files but do I have to put the dllexport and dllimports on the actualy definition? What about for typedefs? Do i put the dllimport/dllexport in front? as in dllexport typedef map<string, int> st_map Also regarding

making proprietary ELF binaries portable on Linux

点点圈 提交于 2019-12-19 16:54:58
问题 I am searching for a way to make existing proprietary ELF-binaries, which are linked against specific versions of system libraries, portable. With portable I mean making the executable work on every system with the same processor architecture and a compatible system kernel, without necessarily having the source code of the libraries (if there is no way without having the source code, it'll be fine too). So far I thought of two possibilities, but I don't know if they are at all possible and if

making proprietary ELF binaries portable on Linux

感情迁移 提交于 2019-12-19 16:53:59
问题 I am searching for a way to make existing proprietary ELF-binaries, which are linked against specific versions of system libraries, portable. With portable I mean making the executable work on every system with the same processor architecture and a compatible system kernel, without necessarily having the source code of the libraries (if there is no way without having the source code, it'll be fine too). So far I thought of two possibilities, but I don't know if they are at all possible and if

Grub bootloader with shared library support

邮差的信 提交于 2019-12-19 13:47:19
问题 I'd like to load a shared library (closed-source binary user-space library) at boot stage with grub boot-loader. Are there any chances for this or I must write a custom-elf-loader (grub module) to do it? 29/08/2014: For more detail, this is a programming problem in which I want to customize or add some new features to Grub boot-loader project. Thank you for your all supporting! 回答1: So, you don't make it crystal clear what you are trying to do, but: Loading a userspace (assuming Linux SysV

How to use c lib(.so) from android?

天大地大妈咪最大 提交于 2019-12-19 11:52:14
问题 Currently i am working on Android NDK and successfully implementing C code in jni and calling c code using jni on android studio 1.5. But now as per as my project requirement i am not using c code on my android project so i am using only .so shared library . I got this link and used sqlcipher but still i don't have enough knowledge about how to add or call .so shared library. Refer above link and example, update my project but following getting error java.lang.UnsatisfiedLinkError: dlopen

version-script and hidden visibility

穿精又带淫゛_ 提交于 2019-12-19 05:45:05
问题 When using gcc to build a shared library, it's possible to limit the visibility of the symbols using -fvisibility=hidden . I also just learned you can limit visibility using the version-script option to ld . Now I want to know if it's possible to combine these. Say I have a program with the following: void foobar() {} void say_hello() {} Then I have the version script file with: { global: foobar; } And I compile this with: gcc -fvisibility=hidden -Wl,--version-script=<version-script> test.c

FreeType library and “Undefined reference to FT_Init_FreeType”

為{幸葍}努か 提交于 2019-12-19 04:05:14
问题 Coming from PHP, this is my first experience with C/C++ (so go easy on me). I'm following this tutorial to write a simple script using the FreeType library. The following compiles just fine: #include <ft2build.h> #include FT_FREETYPE_H main() { FT_Library library; FT_Face face; } This tells me that the FreeType library is readily available to the compiler. However, things break once I try to use any methods. For example, take the following script: #include <ft2build.h> #include FT_FREETYPE_H

Fortran dynamic libraries, load at runtime?

℡╲_俬逩灬. 提交于 2019-12-19 03:59:10
问题 Is it possible to have a Fortran program load a Fortran library at run time? If so, would it be possible to modify a function and recompile only the library to have the originally-compiled program call the modified function in the library at run time? If anyone can provide a minimal working example of how this could be achieved that would be great. 回答1: Here are some few links that can be helpfull: This page on rosettacode.org which gives complete example with details and discuss