Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Answer was to change some entries in the CMakeLists.txt. Here is what I changed:

I removed this part (which was unnecessary though I think):

set (CMAKE_CXX_STANDARD 14)
if(NOT WIN32)
 set(CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wextra -fPIC”)
endif()
IF (NOT DEFINED BUILD_VERSION)
 SET(BUILD_VERSION “not set”)
ENDIF()
ADD_DEFINITIONS(-DBUILD_VERSION=”${BUILD_VERSION}”)

And added the .ui files to my source list (which I think is what solved the problem). So if you have a Qt5 project with GUI make sure to also add the ui files!

set(PUBLISHER_SOURCE
    src_publisher/main.cpp
    src_publisher/publishergui.cpp
    src_publisher/publishergui.ui      # added this line
    src_publisher/Talker.cpp
)

Answer was to change some entries in the CMakeLists.txt. Here is what I changed:

I removed this part (which was unnecessary though I think):

set (CMAKE_CXX_STANDARD 14)
if(NOT WIN32)
 set(CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wextra -fPIC”)
endif()
IF (NOT DEFINED BUILD_VERSION)
 SET(BUILD_VERSION “not set”)
ENDIF()
ADD_DEFINITIONS(-DBUILD_VERSION=”${BUILD_VERSION}”)

And added the .ui files to my source list (which I think is what solved the problem). So if you have a Qt5 project with GUI make sure to also add the ui files!

set(PUBLISHER_SOURCE
    src_publisher/main.cpp
    src_publisher/publishergui.cpp
    src_publisher/publishergui.ui      # added this line
    src_publisher/Talker.cpp
)