ubuntu中的包含math 头文件的问题
-
- 帖子: 448
- 注册时间: 2008-07-10 15:08
ubuntu中的包含math 头文件的问题
在测试头文件的加载时出现了点问题,希望各位指教!
#include<math.h>
#include<stdio.h>
int main(void)
{
double x=sqrt(3,2);
printf("The aquare root of 2.0 is: %f",x);
return 0;
}说:
sqrt: file not recognized: File format not recognized
collect2: ld 返回 1
第二次测试用math中的pow(x,y)函数,即求x的y次幂时也提示相似警告,
接下来我试着 安装math.h 结果又出现问题,如下:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
Reading state information... 完成
E: 无法找到软件包 math.h
希望各位高手指点
#include<math.h>
#include<stdio.h>
int main(void)
{
double x=sqrt(3,2);
printf("The aquare root of 2.0 is: %f",x);
return 0;
}说:
sqrt: file not recognized: File format not recognized
collect2: ld 返回 1
第二次测试用math中的pow(x,y)函数,即求x的y次幂时也提示相似警告,
接下来我试着 安装math.h 结果又出现问题,如下:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
Reading state information... 完成
E: 无法找到软件包 math.h
希望各位高手指点
- kofshower
- 帖子: 1343
- 注册时间: 2007-03-13 11:23
- 联系:
libc6-dev: /usr/include/math.h
可见是这个包
这句话让我不理解:E: 无法找到软件包 math.h
是不是误用了apt-get install math.h????
可见是这个包
这句话让我不理解:E: 无法找到软件包 math.h
是不是误用了apt-get install math.h????
上次由 kofshower 在 2008-07-10 22:26,总共编辑 2 次。
"We are all in the mud, but some of us are looking at the stars." (Oscar Wilde)
We are not born for ourselves.
人生天地间,并非为自己
Homepage:http://sites.google.com/site/polarisnotme/
We are not born for ourselves.
人生天地间,并非为自己
Homepage:http://sites.google.com/site/polarisnotme/
- BigSnake.NET
- 帖子: 12522
- 注册时间: 2006-07-02 11:16
- 来自: 廣州
- 联系:
-
- 帖子: 448
- 注册时间: 2008-07-10 15:08
- BigSnake.NET
- 帖子: 12522
- 注册时间: 2006-07-02 11:16
- 来自: 廣州
- 联系:
-
- 帖子: 448
- 注册时间: 2008-07-10 15:08
-
- 帖子: 448
- 注册时间: 2008-07-10 15:08
-
- 帖子: 448
- 注册时间: 2008-07-10 15:08
-
- 帖子: 448
- 注册时间: 2008-07-10 15:08
- kofshower
- 帖子: 1343
- 注册时间: 2007-03-13 11:23
- 联系:
我是说应该是 apt-get install libc6-devkofshower 写了:libc6-dev: /usr/include/math.h
可见是这个包
这句话让我不理解:E: 无法找到软件包 math.h
是不是误用了apt-get install math.h????
或是apt-get install build-essential
因为这个包相当于一个虚拟包,就是包的集合,里面包括了开发用的
libc6-dev | libc-dev, gcc (>= 4:4.1.1), g++ (>= 4:4.1.1), make, dpkg-dev (>= 1.13.5)
这些包
"We are all in the mud, but some of us are looking at the stars." (Oscar Wilde)
We are not born for ourselves.
人生天地间,并非为自己
Homepage:http://sites.google.com/site/polarisnotme/
We are not born for ourselves.
人生天地间,并非为自己
Homepage:http://sites.google.com/site/polarisnotme/
- kofshower
- 帖子: 1343
- 注册时间: 2007-03-13 11:23
- 联系:
Ctrl-C是给终端中的程序发中断signalweihua2008 写了:Ctrl-C 和 Ctrl-V 有特别用途?
麻烦你说详细点!
初学者,知道的少,
Ctrl-V没有用。
默认的终端键盘绑定emace样式的。
不喜欢可以用vim样式
"We are all in the mud, but some of us are looking at the stars." (Oscar Wilde)
We are not born for ourselves.
人生天地间,并非为自己
Homepage:http://sites.google.com/site/polarisnotme/
We are not born for ourselves.
人生天地间,并非为自己
Homepage:http://sites.google.com/site/polarisnotme/
- BigSnake.NET
- 帖子: 12522
- 注册时间: 2006-07-02 11:16
- 来自: 廣州
- 联系:
- kofshower
- 帖子: 1343
- 注册时间: 2007-03-13 11:23
- 联系:
我的错。没有意识到那^M之类的用C-V-M来画BigSnake.NET 写了:Ctrl-V 是转义用的。。kofshower 写了:Ctrl-C是给终端中的程序发中断signalweihua2008 写了:Ctrl-C 和 Ctrl-V 有特别用途?
麻烦你说详细点!
初学者,知道的少,
Ctrl-V没有用。
默认的终端键盘绑定emace样式的。
不喜欢可以用vim样式
"We are all in the mud, but some of us are looking at the stars." (Oscar Wilde)
We are not born for ourselves.
人生天地间,并非为自己
Homepage:http://sites.google.com/site/polarisnotme/
We are not born for ourselves.
人生天地间,并非为自己
Homepage:http://sites.google.com/site/polarisnotme/