shared-libraries

Android: INSTALL_FAILED_MISSING_SHARED_LIBRARY

假装没事ソ 提交于 2019-12-13 05:54:43
问题 I'm trying to use the following library in my Android app: http://www.jjoe64.com/p/graphview-library.html I donwloaded the .jar file and added it the Java Build Path, but I got the following error: java.lang.NoClassDefFoundError: com.jjoe64.graphview.GraphView$GraphViewData[] On further investigation, I discovered that I had to use the "uses-library" tag in the AndroidManifest under "application". However, I don't know what to enter under android:name. <uses-library android:name="com.jjoe64

What process/library on Android is responsible for dispatching touch events to applications?

本秂侑毒 提交于 2019-12-13 05:54:16
问题 What process/library on Android is responsible for dispatching touch events to applications? I was so focused on the hooking that I completely forgot that Android source is available. Update/Clarification: I want to have my code intercept all touch events for ALL applications in the system, do custom processing on them and forward to original receiver. Update 2: Assume a rooted device and application for private/internal use only, NOT for mass distribution Original, badly formulated question:

How to use alternate glibc with existing libstdc++?

ε祈祈猫儿з 提交于 2019-12-13 05:53:56
问题 I need to use a self-compiled version of glibc (2.18), newer than the default one on the system (2.15). I can compile&link a C++ program, but when I try to run it, I get errors about libstdc++.so.6 . (C programs seems to work just fine.) Do I need to recompile gcc against the newer glibc for this to work? Why? (Update: I figured this part out, but I have a few other questions at the bottom.) Here is a sample C++ program: #include <iostream> int main() { std::cout << "ok\n"; return 0; }

Possible to statically link shared object libraries?

这一生的挚爱 提交于 2019-12-13 04:47:13
问题 I'm building a library that needs to be dynamically linked to my project. The output is a .so file, so I think I'm on the right track. I'm concerned by the way it's being linked at compile time - by specifying the location of its makefile and depending on a bunch of macros, which I've never encountered before. Can I assume that since I'm building a .so library (rather than a .a) that I'm in fact dynamically linking? Or is it possible for .so libs to be statically linked, in which case I need

Referencing global symbols from shared library loaded with dlopen

余生长醉 提交于 2019-12-13 04:35:51
问题 I have a shared library which I want to access symbols from the main program. For example: main.c #include <stdio.h> void bar(void) { puts("bar"); } extern void foo(void); int main(void) { foo(); return 0; } foo.c #include <stdio.h> extern void bar(void); void foo(void) { puts("foo"); bar(); } I compile and run like: gcc -c -fpic foo.c gcc -shared -o libfoo.so foo.o gcc -L$(pwd) -o test main.c -lfoo ./test And I get the output I expect: foo bar However, I must use dlopen() and dlsym() because

Difference between version number, minor number and release number

纵然是瞬间 提交于 2019-12-13 04:28:42
问题 I'm reading http://www.tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html and I had some questions. What is difference between version, minor and release number? What is meant by the part "version number is incremented whenever the interface changes"? The soname has the prefix lib , the name of the library, the phrase .so , followed by a period and a version number that is incremented whenever the interface changes. The real name adds to the soname a period, a minor number, another

Shared Libraries in Java AWS Lambda Project

孤街浪徒 提交于 2019-12-13 04:25:34
问题 In my java class System.loadLibrary() is not able to locate the library files. I have used Gradle build to zip file in below structure: zip mypackage App.class GatewayResponse.class lib set of jars and shared libraries Lambda service is able to load my jar but not libraries. Imagine example.jar and libExample.so are part of my lib directory. From App class: I have created an object of some class in the example.jar and it works fine. when I try to load the library libExample.so using system

Display floating point by printf

≯℡__Kan透↙ 提交于 2019-12-13 04:21:27
问题 I have problem with display floating point value using printf. I'm trying display result of some math function, but I always get 0.00. Could you help me and tell what I'm doing wrong? My GNU AS code: .text text: .ascii "Function result: %4.2f \n" .data x: .float 2.0 one: .float 1.0 result: .float 0.0 format: .ascii "%f" .global main main: push $x push $format call scanf FINIT FLDS x FMULS x #x*x FADDS one FSQRT FSUB one FSTS result xor %eax, %eax push $result push $text call printf pushl $0

Rebuild EXE after DLL updated?

こ雲淡風輕ζ 提交于 2019-12-13 04:07:10
问题 I saw topics and microsoft official doc (https://docs.microsoft.com/en-us/cpp/build/determining-which-exporting-method-to-use), said that after we add an exporting function to our dll, we have to rebuild the DLL (logic) AND the EXE. I don't understand why they say that, after tests it is not the case, i don't have to rebuild my exe after i add functions to my dll. My functions are exported with __declspec and there are basic C functions. They (the link) advice us to use .def file with ordinal

How to use PCRE in C for multiple matches

大憨熊 提交于 2019-12-13 03:47:19
问题 I am trying to use C's PCRE library to then use regex for matching multiple links to USA Senator's from the webpage. So to do this I need the regex to be able to return 100 matches for me so I can then print out the web addresses to the emails. From my research, it looks like the PCRE library is going to be the way to do this but I don't know how to get multiple matches from a string. This is the regex pattern that I am going to be using Contact:\s+<a\s+(?:[^>]*?\s+)?href=(["'])(.*?)\1 Here