Did I set up the project correctly with the MinGW compiler (CLion)
Installed MinGW via msys2:
- compiler
pacman -S mingw-w64-x86_64-gcc
- make
pacman -S mingw-w64-x86_64-make
- gdb.
Added paths to system variables:
C:\msys64\mingw64\bin
C:\msys64\usr\bin
Toolchain minGW
The tulchain is valid, the project is being built.
Problem
I try to fail in std:: cout.
Fails, but the message pops up:
This file does not belong to any project target, code insight features might not work propely
In Visual Studio, there is no such thing, for example, I use MinGW and CLion for the first time.
The file iostream is located in
C:\msys64\mingw64\include\c++\10.2.0
Questions
- Does this message mean that the header is not in the project ?
- Is this normally considered or did MinGW put it crookedly ?
- Is it possible to transfer a header with all the dependent headers from the CLiona itself to project, for example the same iostream ?
CMakeList.txt
cmake_minimum_required(VERSION 3.17)
project(hello)
set(CMAKE_CXX_STANDARD 14)
set(SOURCE_FILES main.cpp)
add_executable(hello ${SOURCE_FILES})
Main.cpp
#include <iostream>
int main() {
double x;
std::cin >> x;
std::cout << "Hello, World! " << x << std::endl;
return 0;
}
0