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);
}
extern "C" int sum(int a, int b)
{
return (a+b);
}
To copy to clipboard, switch view to plain text mode
I also wrote a function to load it dynamically (the libtest.so is under the same directory):
if (mylib.isLoaded())
// message 1
else
// message 2
QLibrary mylib("./libtest");
if (mylib.isLoaded())
// message 1
else
// message 2
To copy to clipboard, switch view to plain text mode
The result is that the library cannot be loaded, as the message 2 is always shown.
Any suggestion?
Thank you!
Bookmarks