samedi 12 février 2022

C++ Threads not compiling on Clion

Unable to compile a simple multithreading code.

Error: C:\Users\Aditya\CLionProjects\hello\main.cpp:13:5: note: 'std::thread' is defined in header ''; did you forget to '#include '? C:\Users\Aditya\CLionProjects\hello\main.cpp:3:1: +#include

Config:

CmakeLists.txt

cmake_minimum_required(VERSION 3.16)

project(hello)

set(CMAKE_CXX_STANDARD 17)

find_package (Threads)

add_executable(hello main.cpp)

target_link_libraries (hello Threads::Threads)

Aucun commentaire:

Enregistrer un commentaire