Hi, I want to use QtSingleApplication in my application. I decided to use it as a thirdparty static library, apart from my own code. In the folder containing QtSingleApplication .h/.cpp files I created the following CMakeLists.txt:
Qt Code:
PROJECT(qtsingleapplication) cmake_minimum_required(VERSION 2.8) SET( qtsingleapplicationSources qtlocalpeer.cpp qtlockedfile.cpp qtlockedfile_unix.cpp qtlockedfile_win.cpp qtsingleapplication.cpp qtsinglecoreapplication.cpp ) INCLUDE_DIRECTORIES(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) ADD_LIBRARY( myapp_qtsingleapplication STATIC ${qtsingleapplicationSources} ) TARGET_LINK_LIBRARIES( myapp_qtsingleapplication ${QT_QTNETWORK_LIBRARY})To copy to clipboard, switch view to plain text mode
Unfortunately make fails with the following error:
I can't understand the reason of the error; qtlockedfile.h is in place.myapp/thirdparty/QtSingleApplication/qtlockedfile.cpp:83:1: error: ‘QtLockedFile’ does not name a type
Can you help me?
Very thanks.
Bookmarks