• «
  • 1
  • 2
  • »
  • Pages: 1/2     Go
主题 : ubuntu下编译qtopia2.2出错 复制链接 | 浏览器收藏 | 打印
级别: 侠客
UID: 9088
精华: 0
发帖: 62
金钱: 380 两
威望: 118 点
综合积分: 124 分
注册时间: 2009-09-16
最后登录: 2017-09-13
楼主  发表于: 2010-03-25 10:58

 ubuntu下编译qtopia2.2出错

我按mini2440手册,运行./build编译安装qtopia-x86出现如下错误:
/home/zhangcz/qte-work/x86-qtopia/qtopia-2.2.0-FriendlyARM/dqt/src/tools/qglobal.cpp:38:
/usr/include/netinet/in.h:24:20: 错误: stdint.h:没有该文件或目录
In file included from /home/zhangcz/qte-work/x86-qtopia/qtopia-2.2.0-FriendlyARM/dqt/mkspecs/linux-g++/qplatformdefs.h:57,
                 from /home/zhangcz/qte-work/x86-qtopia/qtopia-2.2.0-FriendlyARM/dqt/src/tools/qglobal.cpp:38:
/usr/include/netinet/in.h:97: 错误: ‘uint16_t’没有命名一个类型
/usr/include/netinet/in.h:141: 错误: ‘uint32_t’没有命名一个类型
/usr/include/netinet/in.h:144: 错误: ‘in_addr_t’没有命名一个类型
/usr/include/netinet/in.h:202: 错误: ‘uint8_t’没有命名一个类型
/usr/include/netinet/in.h:204: 错误: ‘uint16_t’没有命名一个类型
/usr/include/netinet/in.h:205: 错误: ‘uint32_t’没有命名一个类型
/usr/include/netinet/in.h:228: 错误: ‘in_port_t’没有命名一个类型
/usr/include/netinet/in.h:234: 错误: ‘in_port_t’在此作用域中尚未声明
但是/usr/include/netinet/in.h是系统文件,。。。。我不知该如何解决,请高手指教
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2010-03-25 13:26
/usr/include/netinet/in.h:24:20: 错误: stdint.h:没有该文件或目录

你的ubuntu上没有装相应的头文件,用
$sudo apt-get install libc6-dev
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 侠客
UID: 9088
精华: 0
发帖: 62
金钱: 380 两
威望: 118 点
综合积分: 124 分
注册时间: 2009-09-16
最后登录: 2017-09-13
2楼  发表于: 2010-03-25 14:07

 Re:kasim

已经装了libc6-dev,而且我搜了一下/usr/include/c++/4.3.3/tr1
/usr/local/arm/4.3.2/arm-none-linux-gnueabi/include/c++/4.3.2/tr1
/usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/usr/include
这三个目录下各有一个stdint.h
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2010-03-25 14:16
在我的ubuntu 9.10上
alex@aling-xw4400:~$ dpkg --list |grep libc6-dev
ii  libc6-dev                            2.10.1-0ubuntu16                           GNU C Library: Development Libraries and Hea
alex@aling-xw4400:~$ dpkg -L libc6-dev |grep stdint.h
/usr/include/stdint.h
alex@aling-xw4400:~$

你的ubuntu和安装的libc6-dev是什么版本的?
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 侠客
UID: 9088
精华: 0
发帖: 62
金钱: 380 两
威望: 118 点
综合积分: 124 分
注册时间: 2009-09-16
最后登录: 2017-09-13
4楼  发表于: 2010-03-25 14:25

 Re:kasim

# dpkg --list |grep libc6-dev
ii  libc6-dev                                  2.9-4ubuntu6.1                            GNU C Library: Development Libraries and Header Files
# dpkg -L libc6-dev |grep stdint.h
/usr/include/stdint.h
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
5楼  发表于: 2010-03-25 15:27

 回 4楼(zhangcz) 的帖子

如果你的/usr/include/下的确有stdint.h的话,那恐怕就要问问你的gcc为什么找不到这个文件了
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 侠客
UID: 9088
精华: 0
发帖: 62
金钱: 380 两
威望: 118 点
综合积分: 124 分
注册时间: 2009-09-16
最后登录: 2017-09-13
6楼  发表于: 2010-03-25 16:01

 Re:kasim

再次麻烦了,有什么解决办法吗,我已经倒腾半天了
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
7楼  发表于: 2010-03-25 17:57

 回 6楼(zhangcz) 的帖子

抱歉,我不清楚你PC的具体环境,没办法知道为什么你的gcc找不到这个头文件
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 侠客
UID: 9088
精华: 0
发帖: 62
金钱: 380 两
威望: 118 点
综合积分: 124 分
注册时间: 2009-09-16
最后登录: 2017-09-13
8楼  发表于: 2010-03-26 10:24

 Re:kasim

kasim 你好,我的环境是ubuntu9.04     gcc4.3.3    
还是那个问题,昨天输了这个命令以后# dpkg -L libc6-dev |grep stdint.h
输出/usr/include/stdint.h
但我输入#cat -n /usr/include/stdint.h
输出cat: /usr/include/stdint.h: 没有该文件或目录
但我确认已经装了libc6-dev,而且我搜了一下
/usr/include/c++/4.3.3/tr1
/usr/local/arm/4.3.2/arm-none-linux-gnueabi/include/c++/4.3.2/tr1
/usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/usr/include目录下各有一个stdinth,版主帮帮忙
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
9楼  发表于: 2010-03-26 10:33
还是那个问题,昨天输了这个命令以后# dpkg -L libc6-dev |grep stdint.h
输出/usr/include /stdint.h
但我输入#cat -n /usr/include/stdint.h
输出cat: /usr/include/stdint.h: 没有该文件或目录

那不是很明显了?你的机器上是装过libc6-dev这个包,这个包里也的确包含/usr/include/stdint.h这个文件,但很不幸的是,这个文件后来又被删除了。
重新安装libc6-dev应该可以解决这个问题

/usr/include/c++/4.3.3/tr1
/usr/local/arm/4.3.2/arm-none-linux-gnueabi/include/c++/4.3.2/tr1
/usr /local/arm/4.3.2/arm-none-linux-gnueabi/libc/usr/include目录下各有一个stdinth,版主帮帮忙

/usr/local/arm/4.3.2/目录下的文件是给交叉编译器用的,和你编译x86的qtopia没有关系;
/usr/include/c++/4.3.3/tr1下的文件应该不是gcc直接用的。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
  • «
  • 1
  • 2
  • »
  • Pages: 1/2     Go