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??

0

1 Answer 1

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.

1
  • Right, that's the idea!! I want to deploy it using a static-linking method. What should I do to make a static-linking deployment? Nov 24, 2010 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.