jiveaxe
30th December 2013, 00:21
Hi, I want to use QtSingleApplication (https://qt.gitorious.org/qt-solutions/qt-solutions/source/80592b0e7145fb876ea0e84a6e3dadfd5f7481b6:qtsinglea pplication) 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:
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})
Unfortunately make fails with the following error:
myapp/thirdparty/QtSingleApplication/qtlockedfile.cpp:83:1: error: ‘QtLockedFile’ does not name a type
I can't understand the reason of the error; qtlockedfile.h is in place.
Can you help me?
Very thanks.
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})
Unfortunately make fails with the following error:
myapp/thirdparty/QtSingleApplication/qtlockedfile.cpp:83:1: error: ‘QtLockedFile’ does not name a type
I can't understand the reason of the error; qtlockedfile.h is in place.
Can you help me?
Very thanks.