Error regarding the compiler since i want to run the project through my VM ubuntu

Answered

I cant run the .cpp file trough ubuntu, is there a way to make it possible since I have a virtual machine with Ubuntu installed on my windows PC?

 

C:\Users\Patri\AppData\Local\JetBrains\Toolbox\apps\CLion\ch-0\222.4167.35\bin\cmake\win\bin\cmake.exe -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=C:/Users/Patri/AppData/Local/JetBrains/Toolbox/apps/CLion/ch-0/222.4167.35/bin/ninja/win/ninja.exe -G Ninja -S \\wsl$\Ubuntu\home\watermelon\02_Homework -B \\wsl$\Ubuntu\home\watermelon\02_Homework\cmake-build-debug
-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/Users/Patri/AppData/Local/JetBrains/Toolbox/apps/CLion/ch-0/222.4167.35/bin/mingw/bin/gcc.exe
-- Check for working C compiler: C:/Users/Patri/AppData/Local/JetBrains/Toolbox/apps/CLion/ch-0/222.4167.35/bin/mingw/bin/gcc.exe - broken
CMake Error at C:/Users/Patri/AppData/Local/JetBrains/Toolbox/apps/CLion/ch-0/222.4167.35/bin/cmake/win/share/cmake-3.23/Modules/CMakeTestCCompiler.cmake:69 (message):
  The C compiler

    "C:/Users/Patri/AppData/Local/JetBrains/Toolbox/apps/CLion/ch-0/222.4167.35/bin/mingw/bin/gcc.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: //wsl$/Ubuntu/home/watermelon/02_Homework/cmake-build-debug/CMakeFiles/CMakeTmp
    
    Run Build Command(s):C:/Users/Patri/AppData/Local/JetBrains/Toolbox/apps/CLion/ch-0/222.4167.35/bin/ninja/win/ninja.exe cmTC_1c810 && ninja: error: '//wsl$/Ubuntu/home/watermelon/02_Homework/cmake-build-debug/CMakeFiles/CMakeTmp/testCCompiler.c', needed by 'CMakeFiles/cmTC_1c810.dir/testCCompiler.c.obj', missing and no known rule to make it
    
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)


-- Configuring incomplete, errors occurred!
See also "//wsl$/Ubuntu/home/watermelon/02_Homework/cmake-build-debug/CMakeFiles/CMakeOutput.log".
See also "//wsl$/Ubuntu/home/watermelon/02_Homework/cmake-build-debug/CMakeFiles/CMakeError.log".

[Finished]

1 comment
Comment actions Permalink

Hello!

In case of WSL, you need to use the WSL toolchain - https://www.jetbrains.com/help/clion/how-to-use-wsl-development-environment-in-product.html.

If your VM is not WSL, you need to use the Remote Host toolchain - https://www.jetbrains.com/help/clion/remote-projects-support.html.

 

0

Please sign in to leave a comment.