Originally Posted by zhehongwang Hello, everyone. Qt Code: Switch view QLibrary mylib("./libtest");if (mylib.isLoaded()) // message 1else // 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? I'd try to add a line Qt Code: Switch view mylib.load(); mylib.load(); To copy to clipboard, switch view to plain text mode
QLibrary mylib("./libtest");if (mylib.isLoaded()) // message 1else // message 2
QLibrary mylib("./libtest"); if (mylib.isLoaded()) // message 1 else // message 2
mylib.load();
I think I've found the problem. I should put the libtest.so file under the /lib or /usr/lib, or use ldconfig instead. Thanks all
Forum Rules
Bookmarks