在mount windows 文件,编译时 cc1plus: error: hello.cpp: Value too large for defined data type

来源:互联网 发布:Ubuntu mysql安装教程 编辑:程序博客网 时间:2024/06/04 19:39

最近用在虚拟机上用ubuntu 10.04 mount windows 的文件,

 

在编译时却发现:

 

 

root@ubuntu:~/project/hello# g++ -Wall hello.cpp -o hello

cc1plus: error: hello.cpp: Value too large for defined data type

 

 

而将hello.cpp 拷贝到ubuntu自己的文件目录中再编译,却正常通过。

 

网上查了才知道,是因为mount方式时, 不知系统加载了什么,导致文件超过了2G,

 

从而系统报错,中断了编译。

 

终于找到解决方法了:

只要在mount的时候加上选项:,nounix,noserverino 即可。

 


参考:

http://girlit.net/question/cc1plus-error-include-value-too-large-for-defined-data-type-when-compiling-with-g 

 

https://bbs.archlinux.org/viewtopic.php?id=85999

原创粉丝点击