problems with threads in a shared object



I have a program that imports plugins via dlopen and dlsym(). In those
plugins I use functions like g_mutex_lock to lock a variable, declared in
the main program. But when getting to the mutex function the whole program
crashes.
The .so library is compiled with:

gcc -g -O0 -shared `pkg-config --libs --cflags gtk+-2.0 glib-2.0
gthread-2.0` rr.c -o rr.so

What's wrong?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]