简体   繁体   English

如何部署具有所有依赖项的C ++项目?

[英]How to deploy C++ project with all dependencies?

I am working on a C++ project that requires third-party libraries ( boost , poco , etc). 我正在一个C ++项目中,该项目需要第三方库( boostpoco等)。 I use cmake/make to install the package to an install location and deploy it to the production machine. 我使用cmake/make将软件包安装到安装位置,然后将其部署到生产机器上。 However, when pushing the app to another machine, the shared libraries are not present on the target machine causing ld errors. 但是,将应用程序推送到另一台计算机时,目标计算机上不存在共享库,从而导致ld错误。 Is there a standard way to detect dependencies (ie shared libs) and deploy them to the install location along the application? 是否存在检测依赖关系(即共享库)并将其部署到应用程序中安装位置的标准方法?

You can try Linux Deploy Qt .I use it for deploying my Qt application written in C++. 您可以尝试Linux Deploy Qt 。我用它来部署用C ++编写的Qt应用程序。 Apart from Qt, it also puts other non-Qt dependencies(libraries) into a single directory. 除了Qt,它还将其他非Qt依赖项(库)放入单个目录中。 just run it with the executable as the argument. 只需以可执行文件作为参数运行它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM