PDA

View Full Version : Deploying the Qt Application on Linx/Win



nnead
3rd August 2014, 01:16
Hello I have a "stupid(?)" question. I am working the first time with Qt5 and - finally after 5000 lines of code - my application is done.
I have already build a Windows version (no static build) and have now build the Raspberry version. The executable on the Raspberry works fine, but after deleting all .h and .cpp files it doesnt work anymore. If i return all .h and .cpp files the application works again. Why is that so and can this be change? I dont want the sourcecode to be open.

ChrisW67
3rd August 2014, 08:11
The C++ source code is not required for the executable to run. Your problem is elsewhere.

nnead
3rd August 2014, 09:04
you are right, doubleclicking the icon does not works while start through comman line works, why that?

ChrisW67
3rd August 2014, 09:22
Probably because the environment that the command line gives the program includes the Qt libraries, and this is not the case when double clicking the executable. If Windows or Linux cannot find the dynamic libraries required by your executable then it will not load.
http://qt-project.org/doc/qt-5/windows-deployment.html#shared-libraries
http://qt-project.org/doc/qt-5/linux-deployment.html#shared-libraries