I have a project written in C ++ QT , a program that counts how many times you have to stroke a cat. When building a project in exe, I need to consider the architecture for which I collect it: x32 or x64 , and then a number of questions arise .

  1. If you build a project under x32 , so that users with different architectures can use it, nothing criminal will happen?

  2. To run the project on another machine, you need to put in the folder with the project all the necessary dll . Is it possible to “sew” them into exe in any way or bypass it? Since I tried to transfer the collected project, it weighs about 60mb with all the necessary libraries.

  • Specify the platform for which the software is developed - Cerbo
  • @Cerbo windows of course - ParanoidPanda
  • The question must be corrected, for example, a tag is added, but it is not necessary to write here - Cerbo
  • Do you think if you insert dll into the project, the total volume will decrease? And by the way, 60 megabytes for a desktop project is not much. - VladD
  • @VlaD about the total volume, I asked if there is any method to reduce the list of necessary dll'ok - ParanoidPanda

1 answer 1

Use static linking (described, for example, in the article " Qt is a static linking library under Windows [ archive ] ), which, of course, will affect the final size of the resulting binary.

In the case of dynamic linking, your application will in any case require Qt dynamic libraries (.dll or .so).

It is also worth remembering that the LGPL does not allow static linking. And if you choose the GPL, you will need to provide the source codes of your software. Or purchase a Qt commercial license.

  • And it is possible about licenses in more detail, because the project that I want to collect has no economic value / importance. - ParanoidPanda
  • one
    @ParanoidPanda: gpl faq . there is both about gpl, and about lgpl, and about static, and about dynamic layout. - aleksandr barakin