前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Can't build Qt5 (qtbase) on Windows XP (win32-msvc2005)

Can't build Qt5 (qtbase) on Windows XP (win32-msvc2005)

作者头像
用户3519280
发布2023-07-06 14:10:58
1410
发布2023-07-06 14:10:58
举报
文章被收录于专栏:c++ 学习分享

Can't build Qt5 (qtbase) on Windows XP (win32-msvc2005)

dfaure 7 years ago

In a cmd.exe prompt, using msysgit, I cloned git://gitorious.org/qt/qtbase.git. Set QTDIR to that qtbase directory, added %QTDIR%\bin to PATH. Made sure sh.exe is not in the PATH. Set The problem:

configure -developer-build -opensource -nomake examples -nomake tests fails with a link error for configure.exe, due to duplicated symbols: @ Please wait while bootstrapping configure ...

Microsoft (R) Program Maintenance Utility Version 8.00.50727.762 Copyright (C) Microsoft Corporation. All rights reserved.

代码语言:javascript
复制
    link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:CONSOLE " /MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST /MANIFESTFILE:"configure.intermediate.manifest" /OUT:..\..\configure.exe @C:\DOCUME~1\kdabian\LOCALS~1\Temp\nm46.tmp

environment.obj : error LNK2005: "public: __thiscall public: __thiscall QList<class QString>::QList<class QString>(class QList<class QString> const &)'::5'::Cleanup::Cleanup(struct QListData::Data *)" (??0Cleanup@?4???0?

Sample compilation line, to see the flags: @ cl -c -FIconfigure_pch.h -Yuconfigure_pch.h -Fpconfigure_pch.pch -MP -nologo -Zm200 -Zc:wchar_t -MT -W3 -GR -EHsc -w34100 -w34189 -DUNICODE -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DCOMMERCIAL_VERSION -I"....\include" -I"....\include\QtCore" -I"....\include\QtCore\5.0.0" -I"....\include\QtCore\5.0.0\QtCore" -I"C:\Qt\qtbase\tools\shared" -I"C:\Qt\qtbase\mkspecs\win32-msvc2008" C:\Qt\qtbase\src\corelib\xml\qxmlstream.cpp C:\Qt\qtbase\src\corelib\xml\qxmlutils.cpp qxmlstream.cpp @ (funny that -opensource sets -DCOMMERCIAL_VERSION, but that's unrelated...) Strange, too that my QMAKESPEC being set to win32-msvc2005 leads to win32-msvc2008 in the compilation line.

David Faure (david.faure@kdab.com) KDE/Qt Senior Software Engineer KDAB - Qt Experts - Platform-independent software solutions

0


3 Posts

5.4k Views

Log in to reply


gonzoua 7 years ago

I had this problem too. It looks like there is no way around it except upgrading Visual Stduio. The problem is described here: http://stackoverflow.com/questions/2078087/local-classes-inside-inline-non-member-function-produces-lnk2005-with-msvc2005

The code that triggers the problem is in qlist.h:

@template <typename T> Q_OUTOFLINE_TEMPLATE QList<T>::QList(const QList<T> &l) : d(l.d) { if (!d->ref.ref()) { p.detach(d->alloc);

代码语言:javascript
复制
    struct Cleanup
    {
        Cleanup(QListData::Data *d) : d_(d) {}
        ~Cleanup() { if (d_) free(d_); }

        QListData::Data *d_;
    } tryCatch(d);

    node_copy(reinterpret_cast<Node *>(p.begin()),
            reinterpret_cast<Node *>(p.end()),
            reinterpret_cast<Node *>(l.p.begin()));
    tryCatch.d_ = 0;
}

} @

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2019-09-20,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Can't build Qt5 (qtbase) on Windows XP (win32-msvc2005)
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档