Chinaunix首页 | 论坛 | 博客
  • 博客访问: 20560
  • 博文数量: 10
  • 博客积分: 215
  • 博客等级: 二等列兵
  • 技术积分: 102
  • 用 户 组: 普通用户
  • 注册时间: 2011-07-14 16:32
文章分类

全部博文(10)

文章存档

2011年(10)

我的朋友

分类: LINUX

2011-07-26 20:53:52

在linux下写了个函数,用到了头文件中的pow()函数,但用gcc编译不过去,是链接时出现错误。

原因:pow()函数是个c标准库函数,linux下gcc默认使用Gnuc,在编译时后面加上一个 -lm 链接到标准库即可,

通过man 函数名 时左上角显示的数字,便可判断此函数类型。

具体如下:

The manual is generally split into eight numbered sections, organized as follows (on BSD, Unix and Linux):

SectionDescription
1General commands     
2System calls
3C library functions
4Special files (usually devices, those found in /dev) and drivers
5File formats and conventions
6Games and screensavers
7Miscellanea
8System administration commands and daemons
阅读(419) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~