Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » MinGW paths from Qt, import CMake project on windows
MinGW paths from Qt, import CMake project on windows [message #1839731] Fri, 26 March 2021 15:17 Go to next message
Jose Maldonado is currently offline Jose MaldonadoFriend
Messages: 6
Registered: March 2021
Junior Member
I have a cmake managed code that compiles fine from the commandline

cmake_minimum_required(VERSION 3.13)

set(CMAKE_PROJECT_NAME "testProject")
project(${CMAKE_PROJECT_NAME})

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)


#set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(BIN_PATH "binAPP")
set(TMP_BUILD "tmpBuild")
set(LIB_PATH "theLib")
set(APP_PATH "app")

set(OUT_PATH ${CMAKE_SOURCE_DIR}/../${BIN_PATH})
set(BUILD_TEMP_PATH ${OUT_PATH}/${TMP_BUILD})

add_subdirectory(${LIB_PATH} ${BUILD_TEMP_PATH}/${LIB_PATH})
include_directories(${LIB_PATH})

add_subdirectory(${APP_PATH} "${BUILD_TEMP_PATH}/${APP_PATH}")
include_directories(${APP_PATH})

/////////////////////////////////////////////////////////////////////////////////////////
 cmake -G "MinGW Makefiles" ..
-- The C compiler identification is GNU 8.1.0
-- The CXX compiler identification is GNU 8.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Qt/Tools/mingw810_64/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Qt/Tools/mingw810_64/bin/g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/maldonadolopez/Documents/ApAlDesarrollo_PRG/test_v4/Build

But when I try to import it into eclipse under windows (under linux works), I get the next error report:
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage



If I add the next code I get the same error:

set(CMAKE_C_COMPILER "C:/Qt/Tools/mingw810_64/bin/gcc.exe")
set(CMAKE_CXX_COMPILER "C:/Qt/Tools/mingw810_64/bin/g++.exe")
set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/../"cardeaInst")


(I would like to use the MinGW from QtCreator, so I added C:\Qt\5.15.2\mingw81_64\bin & C:\Qt\Tools\mingw810_64\bin to windows PATH variable)
I think it is an eclipse path problem, but I'm not sure, and I don't know how should I configure the eclipse paths.
Any help please?

Thanks in advance.

PD: I don't want to generate the eclipse project from commandline with cmake "Eclipse CDT4 - MinGW Makefiles", but direct import from eclipse plugin under the GUI
Re: MinGW paths from Qt, import CMake project on windows [message #1839743 is a reply to message #1839731] Sat, 27 March 2021 06:31 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
This is a problem with CMake and not with Eclipse.

Perhaps these might help:
https://stackoverflow.com/questions/50345127/cmake-mingw-unknown-compilers-gcc-exe-broken
https://stackoverflow.com/questions/48160125/cmake-was-unable-to-find-a-build-program-corresponding-to-unix-makefiles
Previous Topic:qt5 creator: paint a half circle line inside of a rectangle?
Next Topic:learning c, example code gives error? [solved]
Goto Forum:
  


Current Time: Fri Apr 26 14:45:38 GMT 2024

Powered by FUDForum. Page generated in 0.03552 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top