Home > Mobile >  eclipse on Windows with gcc through msys2: CMake4eclipse plugin throw an error
eclipse on Windows with gcc through msys2: CMake4eclipse plugin throw an error

Time:04-17

I configured eclipse with gcc/msys2 according with the following steps: https://www.devdungeon.com/content/how-setup-gcc-msys2-eclipse-windows-c-development

gcc and eclipse work fine togehter in CDT Managed build, but when I use the cmake4eclipse plugin, I become the following error:

"C:\msys64\usr\bin\make.exe" -C "bin\bin -j3" all make: *** bin\bin -j3: No such file or directory. Stop. "C:/msys64/usr/bin/make.exe -C bin\bin -j3 all" terminated with exit code 2. Build might be incomplete.

Here are the involved files:

CMakeLists.txt

cmake_minimum_required (VERSION 3.13)

set(CMAKE_PROJECT_NAME "test")
project($(CMAKE_PROJECT_NAME))

add_executable(tst tst2.cpp)

tst2.cpp #include using namespace std;

int main(int argc, char **argv) {
    cout << "Hello Jose";
    return 0;
}

Had anybody the same issue? Somebody so kind to help me?

Thanks in advance

CodePudding user response:

As of 2022, cmake4eclipse has the concept of Build Toolkit to set the PATH environment variable. This has been introduced to make it easier to build on windows. Just search the online help of eclipse for details.

BTW: I am the maintainer of cmake4eclipse.

CodePudding user response:

The solution came after installing the mingw64/mingw-w64-x86_64-cmake 3.23.0-1 cmake package. Just msys/cmake 3.22.1-2 was not enough

  • Related