[Qt-creator] Link errors when building on linux

Frank Miller cfrankmiller at gmail.com
Thu Oct 26 05:56:06 CEST 2017


Thanks for the quick response. I should have known better...

I'm on CentOS 7.x (I'm not sure exactly. I don't maintain it):
    $ uname -a
    Linux scone 3.10.0-514.16.1.el7.x86_64 #1 SMP Wed Apr 12 15:04:24 UTC
2017 x86_64 x86_64 x86_64 GNU/Linux

I'm using gcc-7.2.0 which I built myself.
    $ g++ --version
    g++ (GCC) 7.2.0
    Copyright (C) 2017 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is
NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

I'm using qtbase, qtdeclarative, qtquickcontrols, qtscript, and qttools.
All from the head revision of their 5.9 git branches and built with
compiler above.
    $ qmake --version
    QMake version 3.1
    Using Qt version 5.9.3 in /opt/segdeps/gcc/lib

I haven't done a git clean but I always do out-of-source builds and the
git clones are recent.

Would any other information be useful?

What version of Qt do you build against?

Frank

On Wed, Oct 25, 2017 at 10:13 PM, Christian Gagneraud <chgans at gmail.com>
wrote:

> On 26/10/2017 4:06 PM, Frank Miller wrote:
>
>> Greetings,
>>
>> I'm new to qt-creator and would like to build from the source on linux
>> but I am experiencing a curious linker error. I get the same error on
>> the 4.3, 4.4, 4.5, and master git branches. The error message looks like
>> this:
>>
>>      .obj/release-shared/projectexplorer.o: In function
>> `ProjectExplorer::ProjectExplorerPlugin::initialize(QStringList const&,
>> QString*)':
>>      projectexplorer.cpp:(.text+0x216f): undefined reference to
>> `ProjectExplorer::Internal::WinDebugInterface::WinDebugInter
>> face(QObject*)'
>>      projectexplorer.cpp:(.text+0x2196): undefined reference to
>> `ProjectExplorer::Internal::MsvcToolChainFactory::MsvcToolChainFactory()'
>>      collect2: error: ld returned 1 exit status
>>
>> I would be happy to provide the usual system details like OS, compiler,
>> Qt version, and so on but I don't think its relevant. The error is quite
>> easy to understand. The projectexplorer.pro <http://projectexplorer.pro>
>> file lists cpp files that
>> are only built on windows but code from the corresponding headers is
>> referenced on any OS. Here is a change that I made to fix the issue.
>>
>
> But the error could be due to your setup, so tell us about your setup (OS,
> compiler), which git hash are you  at, local modifications, ...
> Did you try a clean rebuild (eg after a git clean -dfx)...
>
> I merely substituted a runtime branch on the OS with a compile time
>> branch on the OS. After this, it builds and runs fine as far as I can
>> tell. I probably should just submit a bug report and be done but the
>> fact that this issue exists for me in all the recent release branches
>> made me want to post a message on this forum and see what people think.
>> I must be doing something unusual right? I can't be the only one who
>> wants to build on linux.
>>
>
> I've built QtC-4.5 from git on Linux very recently and i didn't get this
> build errors.
>
> Chris
>
>
>> Thanks for the great project!
>>
>> Frank
>>
>>
>> _______________________________________________
>> Qt-creator mailing list
>> Qt-creator at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/qt-creator
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20171025/63c6c828/attachment.html>


More information about the Qt-creator mailing list