User forums => General (but related to Code::Blocks) => Topic started by: rv2931 on February 05, 2009, 10:30:03 pm
Title: error while loading shared libraries : libQtCore.so.4 ?!?!?
Post by: rv2931 on February 05, 2009, 10:30:03 pm
Hello,
I've just installed Code::Blocks 8.02 on my Ubuntu 8.04 and I thought that I installed it like previous installation but this time, when I compile the Qt demo "Quit button" project, no errors, but when I execute, I've this error message : "error while loading shared libraries: libQtCore.so.4: cannot open shared object file: No such file or directory" :( I don't really understand cause during the installation, it ask to give the root path of Qt, thing that I've done /usr/local/Trolltech/Qt-4.4.3 I can't give any other path cause it is searching for libQtCore. So here it founds it. But during execution, it does not. Why ? I really don't understand. I don't know how to return to the isntallation window where the Qt root path, include, libs.... are configured ? Where it is ?
thanks for help
RV
Title: Re: error while loading chared libraries : libQtCore.so.4 ?!?!?
Post by: rv2931 on February 11, 2009, 05:54:21 pm
Up ! I really have a problem, and I don't find the solution. I have reconfigured all linkers, with absolute path, tried all path possibilities for search directories and it doesn't work... :o( the compilation gives no error but it fails at the beginning ef the execution
/home/my_script_path: error while loading shared librairies: libQtCore.so.4: cannot open shared object file: No such file or directory
My Linker pathes are : /usr/local/Trolltech/Qt-4.4.3/lib/libQtCore.so & /usr/local/Trolltech/Qt-4.4.3/lib/libQtGui.so
and my codeis just the demo code created automaticaly by Code::Blocks for Qt4 projects.
:? :( :? :( :? thanks
RV
Title: Re: error while loading chared libraries : libQtCore.so.4 ?!?!?
Post by: Jenna on February 11, 2009, 06:46:31 pm
You probably have a dead link from "libQtCore.so" to "libQtCore.so.4" in a standard lib directory.
If that's the case remove it and try again.
If it still does not run,this (http://wiki.codeblocks.org/index.php?title=Compiling_Code::Blocks_in_Linux_%28applies_to_all_distros%29#Resolving_issues_with_Code::Blocks_SVN) wiki-article might help you.
It's about C::B not finding it's libs, if not in systems standard directory, but the same can happen for any other application.
Instead of "/usr/local/lib" you will most likely need to use "/usr/local/Trolltech/Qt-4.4.3/lib".
Title: Re: error while loading chared libraries : libQtCore.so.4 ?!?!?
Post by: rv2931 on February 13, 2009, 09:48:59 am
You were right. I added a file Qt.so.conf in the /etc/ldcon.so.d/ directory in whih one I added the lines :