user236012
user236012

Reputation: 265

CMake - Qt: linking to wrong versions

I'm trying to compile a CMake project which requires Qt 5.6.1. The system has the Qt libraries and headers installed for Qt 5.5.1, so I manually compiled the 5.6.1 library. Then, Compiling the CMake project works fine, however the linker seems to link against 5.5.1 libraries as one of the linker errors seems to show:

[...]
qicucodec.cpp:(.text+0x1ede): undefined reference to `ucnv_countAvailable_55'
[...]

The CMakeLists.txt entry for Qt is

set(QT_VERSION_REQ "5.6.1")
find_package(Qt5Core ${QT_VERSION_REQ} REQUIRED)
find_package(Qt5Xml ${QT_VERSION_REQ} REQUIRED)
find_package(Qt5Network ${QT_VERSION_REQ} REQUIRED)

and those variables point to the manually compiled Qt version:

Qt5Core_DIR   /opt/build/qt/lib/cmake/Qt5Core

Any hints how to solve that issue?

Upvotes: 0

Views: 757

Answers (1)

Rama
Rama

Reputation: 3305

QT5Core depends on libICU, so you need to install it:

sudo apt-get install libicu55

Upvotes: 1

Related Questions