Unsolved How to build rpm package to install on CentOs 6.5 from Qt Creator?
-
Hi @SGaist ,
If I use your info, it will miss Qt libs and then it cannot run as stand alone application on another computer. -
From you description, it looked like your app would use the distribution provided Qt, hence this guide as you would have listed the needed Qt modules as dependencies of your package.
Since it doesn't seem to be the case, shouldn't you rather consider something like an appimage ?
The linuxdeployqt project might be of interest.
-
@SGaist ,
I have tried linuxdeployqt tool, but it gave me errors on running. -
What errors ?
-
@jsulm
I read the article but I am so confusing on " When linking your application against static Qt libraries, note that you might need to add more libraries to the LIBS line in your project file. For more information, see the Application Dependencies section." What does it mean ? How could we link ? -
@SGaist
Old library -
That's a bit vague, can you provide more details ?
-
@John_Qt If you don't use static Qt libraries then just ignore that part...
-
@jsulm ,
Currently I am trying to use static libraries. Could you show me the steps to create static libs and get my qt gui application compile with that lib?Following the http://doc.qt.io/qt-5/linux-deployment.html,
Step 1:
cd /path/to/Qt
./configure -static -prefix /path/to/Qt <other parameters>
make
Step 2:
cd /path/to/Qt/examples/widgets/tools/plugandpaint/app
make clean
PATH=/path/to/Qt/bin:$PATH
export PATH
qmake -config release
makeBut I don't really understand step 2. In the http://qtnbeyond.blogspot.com/2011/03/statically-building-with-qt-creator-in.html, they don't do step 2, they just asked the static libs into the Qt Version and then compile it. So, which steps do you recommend me to do? I am so confusing. Thank for your help.
-
@SGaist
I will try to create the error again when I have a chance because now I tried to create static libs and then create rpm from it. -
@John_Qt There is no need to build all the examples (what the step 2 does).
-
@jsulm ,
What is <other parameters> on step 1? -
@John_Qt There are no parameters in step one: it is just to download Qt source code. So what do you mean exactly?