[Qt-creator] Linker probably picks up wrong LLVM libraries when linking Qt Creator 4.9
atelszewski at gmail.com
Sun Jul 28 13:33:09 CEST 2019
On 01/06/2019 13:28, Andrzej Telszewski wrote:
> On 28/05/2019 09:23, Eike Ziller wrote:
>>> On 28. May 2019, at 07:38, Andrzej Telszewski <atelszewski at gmail.com>
>>> is put before:
>>> Uninstalling this system-wide version of LLVM for the time of
>>> building Qt Creator allows it to compile and link just fine.
>>> Please advice.
>>> Patches welcome :-)
>>> Thanks in advance!
>> Your diagnosis sounds correct, so the question is where that -L path
>> comes from. My guess that it’s from the mkspecs, but maybe running
>> qmake with additional -d -d -d gives something useful?
>> Br, Eike
> I tried running qmake with -d -d -d and the output is enormous.
> My brain was not capable of parsing the text. Need to use a different
> parser ;-)
> Anyway, I ended up in: _src/plugins/clangformat/Makefile_
> For the clarity of this conversation, I attach a patch showing what has
> to be done in order to link correctly.
> Basically, the search directory for LLVM has to be placed before the
> system libraries.
> Do you know a way to do it at the qmake stage, so that I don't have to
> patch the Makefile?
> Help appreciated!
For the time being I solved the problem by passing the following to qmake:
This way the supplied LLVM libdir is searched before the system-wide
libdir and consequently correct version of LLVM libs are picked up.
($LIBDIRSUFFIX is "64" on 64-bit system and empty on 32-bit system).
Hope this helps!
If there's a better way, please let me know.
Best regards / Pozdrawiam,
More information about the Qt-creator