3

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: libQtGui.so.4: ...". 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 Answers1

0

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.

Community
  • 1
  • 1
John Sloper
  • 1,711
  • 11
  • 14