I've two files:
lib.c
#include<stdio.h>
void hi() {
printf("Hi i'm a library function in lib.so\n");
}
and main.c
#include<stdio.h>
#include<dlfcn.h>
/* based on Jeff Scudder's code */
int main() {
void *SharedObjectFile;
void (*hi)();
// Load the shared libary;
SharedObjectFile = dlopen("./lib.so", RTLD_LAZY);
// Obtain the address of a function in the share
I have a shared library that I'm trying to build, which normally links with another share library. However, this "other" library is being provided by a 3rd party currently, as a static archive (.a file).
Is it possible to statically link-in this other library's .a archive?
I am generating a shared library on linux and I am using this xml parser "mini xml" to parse some xml config files for my library.
I'm trying to understand timers in linux to use it in my application, I've collected code from multiple sources and made the following program
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <signal.h>
#include <time.h>
#include <pthread.h>
pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER;
#define CLOCKID CLOCK_REALTIME
#define SIG SIGUS
Ok I have just started reading how to program kernel modules from a really really old source, my question is why the static __init and static __exit aren't needed any more ?? i am using fedora 12 and they are caught as errors. According to that source the syntax of init_module and cleanup_module should be:
Code:
static __init int init_module(void){
// ...
Hi,
I have tried for weeks. I am creating a shared library from two object files a.o and b.o.
Both a and b are classes that depend on a third-party library and class b wraps class a.
and therefore, both a.o and b.o have the same globals defined from the third-party api.
So I create a.o with
This behavior is a little bit strange.
I get "Cannot make a static reference to the non-static method getSystemService(String) from the type Context" error.
called the class of AsyncTask non-activity app,
called Sag.end from BroadcastReceiver.
public class SaG
{
public static void end(String xxx)
{
new AsyncTask<Integer, Void, Void>(){
@Override
protected Void d
I am using a static library witch developed by using QT(necessitas)。Some issues block my work, so i am writing to ask for some advice from you. The strange issue i met is the
static library and libQtCore.so is linked successly with my Android native
shared library (which compiled by using ndk-r8b), but crash will occur at libQtCore.so.