From c25ebec4a94a4cb83abfbc33f4a9dd43128678d3 Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Fri, 19 Apr 2019 21:15:26 +0200 Subject: [PATCH] Added stdc++ and m to fix compiling issues --- CMakeLists.txt | 2 +- main.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c821928..8aaeaa3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,4 +11,4 @@ set(SOURCES add_executable(picsync ${HEADERS} ${SOURCES}) -target_link_libraries(picsync Qt5::Core dbcorelib) +target_link_libraries(picsync stdc++ m Qt5::Core dbcorelib) diff --git a/main.cpp b/main.cpp index 9e981ee..e2a2728 100644 --- a/main.cpp +++ b/main.cpp @@ -28,9 +28,9 @@ bool writeBitmap(const QString &filename, const QByteArray &content) return false; } - const quint64 pixels = qCeil(content.length() / 4.0); - const quint32 width = qSqrt(pixels); - const quint32 height = qCeil(pixels / (qreal)width); + const quint64 pixels = std::ceil(content.length() / 4.0); + const quint32 width = std::sqrt(pixels); + const quint32 height = std::ceil(pixels / (qreal)width); const quint32 bitmapSize = width * height * 4;