Answer the question
In order to leave comments, you need to log in
How to compile a Qt project into an executable?
Hello. I'm trying to build a project on qt through qt creator. Everything compiles and debugs normally, but in the folder with the compiled project there is only a shared library, instead of an executable one.
Actually the question is how to get an executable file as a result of compilation?
Platform: Manjaro.
There is a main function.
CMakeList.txt
cmake_minimum_required(VERSION 3.5)
project(texted LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt5 COMPONENTS Widgets REQUIRED)
add_executable(texted
main.cpp
mainwindow.cpp
mainwindow.hpp
mainwindow.ui
)
target_link_libraries(texted PRIVATE Qt5::Widgets)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question