Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix Qt static compilation issue #5407

Merged
merged 2 commits into from
Jul 29, 2024
Merged

fix Qt static compilation issue #5407

merged 2 commits into from
Jul 29, 2024

Conversation

xiaobfly
Copy link
Contributor

  • Before adding new features and new modules, please go to issues to submit the relevant feature description first.
  • Write good commit messages and use the same coding conventions as the rest of the project.
  • Please commit code to dev branch and we will merge into master branch in feature
  • Ensure your edited codes with four spaces instead of TAB.

fix append .lib when link .obj file.
fix static qt link macro.

  • 增加新特性和新模块之前,请先到issues提交相关特性说明,经过讨论评估确认后,再进行相应的代码提交,避免做无用工作。
  • 编写友好可读的提交信息,并使用与工程代码相同的代码规范,代码请用4个空格字符代替tab缩进。
  • 请提交代码到dev分支,如果通过,我们会在特定时间合并到master分支上。
  • 为了规范化提交日志的格式,commit消息,不要用中文,请用英文描述。

修复:链接obj文件的时候xmake默认加了.lib后缀。
修复:使用静态qt库的时候xmake替换qt宏不完全。

xiaobfly added 2 commits July 29, 2024 10:08
not append .lib when link .obj file.

for example:

static qt will link these files:

$$[QT_INSTALL_PREFIX]/lib/objects-Debug/Widgets_resources_1/.rcc/qrc_qstyle.cpp.obj
$$[QT_INSTALL_PREFIX]/lib/objects-Debug/Widgets_resources_2/.rcc/qrc_qstyle1.cpp.obj
$$[QT_INSTALL_PREFIX]/lib/objects-Debug/Widgets_resources_3/.rcc/qrc_qmessagebox.cpp.obj
$$[QT_INSTALL_PREFIX]/lib/objects-Debug/Gui_resources_1/.rcc/qrc_qpdf.cpp.obj
$$[QT_INSTALL_PREFIX]/lib/objects-Debug/Gui_resources_2/.rcc/qrc_gui_shaders.cpp.obj

have a link error:

error: LINK fatal error LNK1104: can't open file "$$[QT_INSTALLPREFIX]\Lib\objects-Debug\widgets_resources1\.rcc\qrc_qstyle.cpp.obj.lib"
for example:

before:

$$[QT_INSTALL_PREFIX]/lib/objects-RelWithDebInfo/PrintSupport_resources_1/.rcc/qrc_qprintdialog.cpp.obj
$$[QT_INSTALL_PREFIX]/lib/objects-RelWithDebInfo/PrintSupport_resources_2/.rcc/qrc_qprintdialog1.cpp.obj
$$[QT_INSTALL_PREFIX]/lib/objects-RelWithDebInfo/Widgets_resources_1/.rcc/qrc_qstyle.cpp.obj
$$[QT_INSTALL_PREFIX]/lib/objects-RelWithDebInfo/Widgets_resources_2/.rcc/qrc_qstyle1.cpp.obj
$$[QT_INSTALL_PREFIX]/lib/objects-RelWithDebInfo/Widgets_resources_3/.rcc/qrc_qmessagebox.cpp.obj
$$[QT_INSTALL_PREFIX]/lib/objects-RelWithDebInfo/Gui_resources_1/.rcc/qrc_qpdf.cpp.obj
$$[QT_INSTALL_PREFIX]/lib/objects-RelWithDebInfo/Gui_resources_2/.rcc/qrc_gui_shaders.cpp.obj

after:

"D:/Qt/Qt6.5.3/lib/objects-Debug/Widgets_resources_1/.rcc/qrc_qstyle.cpp.obj",
"D:/Qt/Qt6.5.3/lib/objects-Debug/Widgets_resources_2/.rcc/qrc_qstyle1.cpp.obj",
"D:/Qt/Qt6.5.3/lib/objects-Debug/Widgets_resources_3/.rcc/qrc_qmessagebox.cpp.obj",
"D:/Qt/Qt6.5.3/lib/objects-Debug/Gui_resources_1/.rcc/qrc_qpdf.cpp.obj",
"D:/Qt/Qt6.5.3/lib/objects-Debug/Gui_resources_2/.rcc/qrc_gui_shaders.cpp.obj",
@waruqi waruqi added this to the v2.9.4 milestone Jul 29, 2024
@waruqi waruqi merged commit 2b3aca5 into xmake-io:dev Jul 29, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants