[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Mingw-cross-env-list] linker error for qt5 application
From: |
Tony Theodore |
Subject: |
Re: [Mingw-cross-env-list] linker error for qt5 application |
Date: |
Mon, 08 Jan 2018 21:37:08 +1100 |
> On 8 Jan 2018, at 19:43, Thomas Spitzer <address@hidden> wrote:
>
> I "nearly" nailed it.
>
> if I add "ssl crypt32 crypto iphlpapi" to my CMakeLists.txt and I thereafter
> manually edit the file "CMakeFiles/qt_hallo.dir/linklibs.rsp" and change the
> library order so the 4 libraries are AFTER the qt libraries, it compiles.
>
> So the remaining problem is, to convince cmake to link in the correct order.
> I do not know very much about cmake so maybe you can give me a hint?
That’s very strange, it looks like a bug in cmake as everything I’ve read
suggests that
target_link_libraries should preserve the order specified. There’s an ugly
workaround
using:
set(CMAKE_CXX_STANDARD_LIBRARIES "-lssl -lcrypt32 -lcrypto -liphlpapi
${CMAKE_CXX_STANDARD_LIBRARIES}”)
but I’d ask on the cmake list.
Cheers,
Tony