Hello,
I am using Qt 5.1.0, but I guess this is not directly related to the use of Qt.
I have a library which in fact is my application. It exports many API functions. Some of those API functions are also called internally (from the library itself). That worked fine on Windows, Mac and Linux. But changing the compiler version on Linux, has caused problems. I have following API functions (example):
extern "C" __attribute__((visibility("default"))) int returnMeAZero()
{
return(0);
}
extern "C" __attribute__((visibility("default"))) int returnMeAOne()
{
return(1);
}
I have a client application that loads the library and dynamically binds above 2 functions with dlopen and dlsym. That client application (an executable), when started, calls "returnMeAZero" which works fine. Internally, the library sometimes calls "returnMeAOne" which works also fine. But when the library internally calls "returnMeAZero" it crashes with a segmentation fault.
Above example is simplified. There are several hundreds of functions similar to those above. And only those that are references in the client source code cannot be called internally by the library. That seems very strange to me. Is there any logical explanation for that behaviour?