Test CMake run finished with errors
Hello all!
I am a computer science student, still learning C++ and just getting started with CLion and I am having trouble configuring CLion. I have MinGW installed and CLion seems to see it just fine in the toolchain settings, but gives me the "Test CMake run finished with errors" and give me the first block of error code stuff, and still wont let me compile code. I have two large blocks of error code, the first is from the toolchain settings for MinGW, and the second is from trying to compile the Hello World code.
Note: Im not sure how to indent the code from the rest of the text as ive seen in other forum posts (tab maybe?) so i apologize for my inexperience with posting forum posts, mostly a lurker not a poster.
Antivirus software might have incorrectly identified files generated by CMake as malicious.
To workaround this problem, please exclude the project dir and 'C:\MinGW' from the scanning.
-- The C compiler identification is GNU 6.3.0
CMake Error at C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:643 (file):
file STRINGS file
"C:/Users/Eddie/AppData/Local/Temp/cmake_check_environment/_build10263785117824707517/CMakeFiles/3.15.3/CompilerIdCXX/a.exe"
cannot be read.
Call Stack (most recent call first):
C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:38 (CMAKE_DETERMINE_COMPILER_ID_CHECK)
C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:1 (project)
CMake Error at C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:724 (file):
file failed to open for reading (Invalid argument):
C:/Users/Eddie/AppData/Local/Temp/cmake_check_environment/_build10263785117824707517/CMakeFiles/3.15.3/CompilerIdCXX/a.exe
Call Stack (most recent call first):
C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:38 (CMAKE_DETERMINE_COMPILER_ID_CHECK)
C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:1 (project)
CMake Error at C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:727 (string):
string begin index: 1 is out of range 0 - 0
Call Stack (most recent call first):
C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:38 (CMAKE_DETERMINE_COMPILER_ID_CHECK)
C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:1 (project)
CMake Error at C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:735 (math):
math cannot parse the expression: " * 16 + ": syntax error, unexpected
exp_TIMES, expecting exp_PLUS or exp_MINUS or exp_OPENPARENT or exp_NUMBER
(2).
Call Stack (most recent call first):
C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:38 (CMAKE_DETERMINE_COMPILER_ID_CHECK)
C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:1 (project)
CMake Error at C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:737 (file):
file failed to open for reading (Invalid argument):
C:/Users/Eddie/AppData/Local/Temp/cmake_check_environment/_build10263785117824707517/CMakeFiles/3.15.3/CompilerIdCXX/a.exe
Call Stack (most recent call first):
C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:38 (CMAKE_DETERMINE_COMPILER_ID_CHECK)
C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:1 (project)
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring incomplete, errors occurred!
See also "C:/Users/Eddie/AppData/Local/Temp/cmake_check_environment/_build10263785117824707517/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Eddie/AppData/Local/Temp/cmake_check_environment/_build10263785117824707517/CMakeFiles/CMakeError.log".
Error code: 1
And when I try to compile the simple "Hello World" code, it gives me this error report
"C:\Program Files\JetBrains\CLion 2019.3.3\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - MinGW Makefiles" C:\Users\Eddie\CLionProjects\untitled3
-- The C compiler identification is GNU 6.3.0
CMake Error at C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:643 (file):
file STRINGS file
"C:/Users/Eddie/CLionProjects/untitled3/cmake-build-debug/CMakeFiles/3.15.3/CompilerIdCXX/a.exe"
cannot be read.
Call Stack (most recent call first):
C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:38 (CMAKE_DETERMINE_COMPILER_ID_CHECK)
C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:2 (project)
CMake Error at C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:724 (file):
file failed to open for reading (Invalid argument):
C:/Users/Eddie/CLionProjects/untitled3/cmake-build-debug/CMakeFiles/3.15.3/CompilerIdCXX/a.exe
Call Stack (most recent call first):
C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:38 (CMAKE_DETERMINE_COMPILER_ID_CHECK)
C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:2 (project)
CMake Error at C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:727 (string):
string begin index: 1 is out of range 0 - 0
Call Stack (most recent call first):
C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:38 (CMAKE_DETERMINE_COMPILER_ID_CHECK)
C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:2 (project)
CMake Error at C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:735 (math):
math cannot parse the expression: " * 16 + ": syntax error, unexpected
exp_TIMES, expecting exp_PLUS or exp_MINUS or exp_OPENPARENT or exp_NUMBER
(2).
Call Stack (most recent call first):
C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:38 (CMAKE_DETERMINE_COMPILER_ID_CHECK)
C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:2 (project)
CMake Error at C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:737 (file):
file failed to open for reading (Invalid argument):
C:/Users/Eddie/CLionProjects/untitled3/cmake-build-debug/CMakeFiles/3.15.3/CompilerIdCXX/a.exe
Call Stack (most recent call first):
C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCompilerId.cmake:38 (CMAKE_DETERMINE_COMPILER_ID_CHECK)
C:/Program Files/JetBrains/CLion 2019.3.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:2 (project)
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring incomplete, errors occurred!
See also "C:/Users/Eddie/CLionProjects/untitled3/cmake-build-debug/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Eddie/CLionProjects/untitled3/cmake-build-debug/CMakeFiles/CMakeError.log".
CMake Error:
--------------------------------------------------------------------------------------------
Antivirus software might have incorrectly identified files generated by CMake as malicious.
To workaround this problem, please exclude the project dir and 'C:\MinGW' from the scanning.
--------------------------------------------------------------------------------------------
[Failed to reload]
Google says its because windows defender blocks CMake files as it views them as malicious, but I already added MinGW as an exception in defender. I dont know how else to fix this. Please help
请先登录再写评论。
Hello!
Have you tried following the workaround from the message and exclude the project dir and 'C:\MinGW' from the scanning?