LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 926|回复: 6

在linux下用STL怎么出现莫名其妙的错误?

[复制链接]
发表于 2004-10-1 15:32:24 | 显示全部楼层 |阅读模式
我就在一个文件中包含#include<list>,结果编译的时候出现一大堆莫名其妙的错误:
In file included from /usr/include/c++/3.3.2/i386-redhat-linux/bits/c++locale.h:44,
                 from /usr/include/c++/3.3.2/iosfwd:46,
                 from /usr/include/c++/3.3.2/bits/stl_algobase.h:70,
                 from /usr/include/c++/3.3.2/list:67,
                 from ../include/FTPNoteBook.h:15,
                 from FTPNoteBook.cc:1:
/usr/include/libintl.h:40: error: syntax error before `__const'
/usr/include/libintl.h:44: error: syntax error before `__const'
/usr/include/libintl.h:51: error: syntax error before `__const'
/usr/include/libintl.h:81: error: syntax error before `__const'
/usr/include/libintl.h:85: error: syntax error before `__const'
/usr/include/libintl.h:90: error: syntax error before `__const'

我编译的时候用的是g++的呀!
发表于 2004-10-2 10:33:31 | 显示全部楼层
你这样只把几个错误贴上来,谁能搞清楚你出了什么问题?
 楼主| 发表于 2004-10-5 08:54:13 | 显示全部楼层
因为我实在是没办法把整个程序贴出来啊!
程序太大了。
发表于 2004-10-6 00:40:59 | 显示全部楼层
作为附件
发表于 2004-10-17 16:22:12 | 显示全部楼层
头文件的路径要指明的,否则很有可能出现很多莫名其妙的问题,甚至编译拼命的读硬盘,或者奇形怪状的问题
发表于 2004-10-17 23:27:21 | 显示全部楼层
你换个GCC版本,我用debian后再没出现这个问题
 楼主| 发表于 2004-10-18 15:23:33 | 显示全部楼层
我现在发现如果把include的头文件的位置换一下就没有问题了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表