zhehongwang
4th February 2009, 02:44
Hello, everyone.
I have written a library named libtest.so on kubuntu 8.10 with qt 4.4.3.
Here is its code:
extern "C" int sum(int a, int b)
{
return (a+b);
}
I also wrote a function to load it dynamically (the libtest.so is under the same directory):
QLibrary mylib("./libtest");
if (mylib.isLoaded())
// message 1
else
// message 2
The result is that the library cannot be loaded, as the message 2 is always shown.
Any suggestion?
Thank you!:)
I have written a library named libtest.so on kubuntu 8.10 with qt 4.4.3.
Here is its code:
extern "C" int sum(int a, int b)
{
return (a+b);
}
I also wrote a function to load it dynamically (the libtest.so is under the same directory):
QLibrary mylib("./libtest");
if (mylib.isLoaded())
// message 1
else
// message 2
The result is that the library cannot be loaded, as the message 2 is always shown.
Any suggestion?
Thank you!:)