cc1plus:error:include:使用g ++编译时,定义的数据类型的值太大 [英] cc1plus: error: include: Value too large for defined data type when compiling with g++

查看:589
本文介绍了cc1plus:error:include:使用g ++编译时,定义的数据类型的值太大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个应该在Windows和Linux上编译的项目。我在Visual Studio中创建了该项目,然后为Linux创建了一个makefile。我使用VS创建了Windows中的所有文件。



它在VS中编译和运行完美,但是当我运行makefile并运行g ++时,我得到

  $ g ++ -c -I include -o obj / Linux_x86 / Server.obj src / Server.cpp 
cc1plus:error:include:Value对于定义的数据类型来说太大
cc1plus:error:src / Server.cpp:对于定义的数据类型,值太大

代码只不过是一个Hello World atm。在开始开发之前,我只是想确保一切正常。我试过搜索,但无济于事。



任何帮助将不胜感激。

至少在Ubuntu上我找到了一个解决方案。我,就像你已经注意到,错误只发生在挂载的samba共享 - 它似乎来自g ++'stating文件,inode返回一个非常大的值。



  mount -t cifs -o user = me安装共享添加,名词,noserverino时, ,pass = secret,nounix,noserverino // server / share / mount 

我在< a href =http://bbs.archlinux.org/viewtopic.php?id=85999 =noreferrer> http://bbs.archlinux.org/viewtopic.php?id=85999


I am making a project that should compile on Windows and Linux. I have made the project in Visual Studio and then made a makefile for linux. I created all the files in Windows with VS.

It compiles and runs perfectly in VS but when I run the makefile and it runs g++ I get

$ g++ -c -I include -o obj/Linux_x86/Server.obj src/Server.cpp
cc1plus: error: include: Value too large for defined data type
cc1plus: error: src/Server.cpp: Value too large for defined data type

The code is nothing more than a Hello World atm. I just wanted to make sure that everything was working before I started development. I have tried searching but to no avail.

Any help would be appreciated.

解决方案

I have found a solution on Ubuntu at least. I, like you have noticed that the error only occurs on mounted samba shares - it seems to come from g++ 'stat'ing the file, the inode returns a very large value.

When mounting the share add ,nounix,noserverino to the options, ie:

mount -t cifs -o user=me,pass=secret,nounix,noserverino //server/share /mount

I found the info at http://bbs.archlinux.org/viewtopic.php?id=85999

这篇关于cc1plus:error:include:使用g ++编译时,定义的数据类型的值太大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆