cannot open include file:'math':NO such file or directory怎么改正??

[复制链接]
查看11 | 回复4 | 2015-10-26 10:38:24 | 显示全部楼层 |阅读模式
一、这个错误的意思就是找不到math这个文件,因为C语言里面没有这个文件。这里需要把#include "math" 改为 #include "math.h"或 #include 。头文件一定要以.h文件命令,所以#include 都是.h文件。二、下面为C语言的错误大全及中文解释:1: Ambiguous operators need parentheses — 不明确的运算需要用括号括起2: Ambiguous symbol xxx — 不明确的符号3: Argument list syntax error — 参数表语法错误4: Array bounds missing — 丢失数组界限符5: Array s...
回复

使用道具 举报

千问 | 2015-10-26 10:38:24 | 显示全部楼层
#includemath.h 对应的库是/lib/libm.so.6或/usr/lib/libm.so编译时需要加 -lm 选项,意思是链接名称为libm.o或者libm.so的库文件即,编译时用 gcc test.c -lm...
回复

使用道具 举报

千问 | 2015-10-26 10:38:24 | 显示全部楼层
#include "math"改为#include "math.h"或 #include 头文件一定要以.h文件命令,所以#include 都是.h文件。“”先搜索本地路径,再搜索标准路径。不搜索本地路径,直接搜索标准路径。...
回复

使用道具 举报

千问 | 2015-10-26 10:38:24 | 显示全部楼层
刷星 重下载 重启。。。...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行