Qt cross-platform development?
I just have a little question about running Qt created apps on different operating systems. As a normal user do i have to install Qt framework to ru开发者_JS百科n Qt apps ? I mean i've created Qt app using Windows , then i made a build for Linux . Do i need to install the Qt framework on the Linux pc inorder to run that app ? Or there is a way to package all the needed libraries into the app installer .
Best Regards
You can deliver the dynamic libs you need with your application, as it's described here: http://doc.qt.io/qt-5/deployment.html
Since Qt is not a system library, it has to be redistributed along with your application; the minimum is to redistribute the run-time of the libraries used by the application. Using static linking, however, the Qt run-time is compiled into the executable.
Depends what you mean by 'framework', you will need the runtime libraries, unless you paid Nokia for a license to allow static linking.
For Linux, I think you would generally ensure that the Qt packages have been installed during installation (i.e. make them a requirement of the package you provide). Under Mac OS you would need to package the .so (shared objects) with your application. Under Windows you do the same (provide the .dlls) and install them with the application (not in the system folders).
The issue with static linking that @cbamber85 is alluding to, is the conformance with the LGPL licence where it's legal to link to the libraries at runtime but not at compile time (i.e. use the .so/.dll but not the .a files).
精彩评论