在linux上的qt4.7中生成.so文件而不是.exe

发布于 2024-10-14 16:53:58 字数 283 浏览 0 评论 0原文

我在 QtCreator-2.0.1 中构建了一个简单的 GUI 应用程序,我有以下文件:

first.pro  
first.pro.user  
main.cpp  
mainwindow.cpp  
mainwindow.h  
mainwindow.ui

如果我运行 qmakemake 它会给我一个可执行文件。是否可以从这些文件生成 .so 文件?如果是这样,有人可以告诉我应遵循的步骤吗?

I have built a simple GUI application in QtCreator-2.0.1 i have following files:

first.pro  
first.pro.user  
main.cpp  
mainwindow.cpp  
mainwindow.h  
mainwindow.ui

If I run qmake and make it gives me an executable. Is it possible to generate a .so file from these files? if so, can someone tell me the steps to be followed?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

私野 2024-10-21 16:53:58

您想建立一个共享库吗?一个插件?

当您使用Qt Creator创建项目时,您选择了哪种项目?

就您而言,我猜您想选择 Other Project->C++ Library (然后您可以选择是否需要 共享库Qt 4 插件无论如何

,从你的项目中,我想你必须更改 .pro 中的模板并输入:

TEMPLATE = lib

Are you trying to build a shared library ? A plugin ?

When you created your project with Qt Creator, which kind of project did you choose ?

In your case, I guess you wanted to choose Other Project->C++ Library (you can then choose if you want a shared library or a Qt 4 plugin.

Anyway, from your project, I guess you'll have to change the template in your .pro and put :

TEMPLATE = lib
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文