How to compile a project including all Qt needed libraries, QtCreator, Linux?

0 votes
asked Nov 23, 2010 by delphiprogrammer

First, I am sorry about my English. That's not my language.

I am developing an application in QtCreator, Linux. When the IDE asked me about the libraries I would use, I just leave the selected ones (they was not enabled for unchecking). Now, I have to run the compiled file in RedHat 5, but it doesn't run. It tells "Error while loading shared libraries: ...". So, how do I fix this problem?

I should not install Qt libraries in RedHat (it's a server). I prefer to compile the Qt project including needed Qt libraries (into self compiled file, or in the same directory).

Please, can you tell me some idea??

1 Answer

0 votes
answered Nov 23, 2010 by john-sloper

If you cannot install qt you have two main alternatives:

  1. Deploy the libraries together with your application (how you do this depends on the way you deploy your application. It may suffice to do a manual copy.)
  2. Statically link with the qt libraries. They will then be included in your executable (which will be much larger as a result). Static linking

Some pros and cons of static vs dynamic linking are discussed in this thread.

Welcome to Q&A, where you can ask questions and receive answers from other members of the community.
Website Online Counter