首页 > 解决方案 > CLion:不能包含 Math.h

问题描述

这是我的 CMakeLists.txt:

cmake_minimum_required(VERSION 3.17)
project(fms C)

set(CMAKE_C_STANDARD 99)

add_executable(fms main.c fms.c fms.h fms_data.c)

target_link_libraries(fms m)

以下是编译器错误之一:

C:\Users\Holland\CLionProjects\fms\fms.c(27): 错误 C2065: "M_PI": nichtdeklarierter Bezeichner

标签: cclionmath.h

解决方案


推荐阅读