2010-03-13 16 views
23

ile derlerken tanımlı veri türü için çok büyük değer Windows ve Linux üzerinde derlenmesi gereken bir proje hazırlıyorum. Projeyi Visual Studio'da yaptım ve daha sonra linux için bir makefile yaptım. Windows ile tüm dosyaları VS ile oluşturdum.cc1plus: error: include: g ++

hazırlar ve VS mükemmel çalışır ama makefile çalıştırmak ve g ++ çalıştırıldığında ben kod Merhaba Dünya atm başka bir şey değildir

$ 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 

olsun. Gelişmeye başlamadan önce her şeyin çalıştığından emin olmak istedim. Aramaya çalıştım ama boşuna.

Herhangi bir yardım için teşekkür ederiz.

+2

Kodunuzu vermeden bir cevap almayacaksınız, şüpheleniyorum. –

+0

Şikayet ettiği satırın kodunu gönderir misiniz? Ayrıca, windows için g ++ kullanıyor musunuz? MinGW, Cygwin, ... – pajton

+0

Bu Linux üzerinde çalışıyor. Bu aldığım tüm çıktı. –

cevap

33

buldum (ama sadece derlemek -c diyor) bir en az Ubuntu üzerinde çözüm. Ben, hata sadece monte samba hisseleri üzerinde gerçekleştiğini fark ettim gibi - g + 'gelen dosyayı belirten, inode çok büyük bir değer döndürür.

payı yani noserverino seçeneklerine, nounix eklemek takarken: Ben http://bbs.archlinux.org/viewtopic.php?id=85999

+0

Teşekkürler, bu işe yaramış görünüyor. –

+1

'nounix' seçeneği gerekli olmamalıdır. Sadece 'noserverino' seçeneğini kullanabilirsiniz.Her iki seçeneği de kullandım ve büyük bir proje derlediğimde, tüm dosyalar sadece değiştirilmiş olanlar değil, derlendi. – Jleuleu

-1

Bence g ++ parametreleriniz biraz kapalı veya çakışıyor. senin şunları içerir

sadece
-I dizini derlemek -c (sadece düz dahil belirsiz olabilir. Tam yolu deneyin)
-o ÇıkışDosyası

+0

Sanırım sen -c'yi '-fsyntax-only' ile karıştırıyorsun. –

1

GNU Core Utils:

Ben benzer bir sorun vardı

27 Value too large for defined data type

It means that your version of the utilities were not compiled with large file support enabled. The GNU utilities do support large files if they are compiled to do so. You may want to compile them again and make sure that large file support is enabled. This support is automatically configured by autoconf on most systems. But it is possible that on your particular system it could not determine how to do that and therefore autoconf concluded that your system did not support large files.

The message "Value too large for defined data type" is a system error message reported when an operation on a large file is attempted using a non-large file data type. Large files are defined as anything larger than a signed 32-bit integer, or stated differently, larger than 2GB.

Many system calls that deal with files return values in a "long int" data type. On 32-bit hardware a long int is 32-bits and therefore this imposes a 2GB limit on the size of files. When this was invented that was HUGE and it was hard to conceive of needing anything that large. Time has passed and files can be much larger today. On native 64-bit systems the file size limit is usually 2GB * 2GB. Which we will again think is huge.

On a 32-bit system with a 32-bit "long int" you find that you can't make it any bigger and also maintain compatibility with previous programs. Changing that would break many things! But many systems make it possible to switch into a new program mode which rewrites all of the file operations into a 64-bit program model. Instead of "long" they use a new data type called "off_t" which is constructed to be 64-bits in size. Program source code must be written to use the off_t data type instead of the long data type. This is typically done by defining -D_FILE_OFFSET_BITS=64 or some such. It is system dependent. Once done and once switched into this new mode most programs will support large files just fine.

See the next question if you have inadvertently created a large file and now need some way to deal with it.

+0

Stat olarak adlandırılmaya çalışılırken "Tanımlanmış veri türü için çok büyük değer" hatası alıyordum. Koduma #define _FILE_OFFSET_BITS 64 eklenmesi sorunu çözdü. –

2

de bilgi bulundu

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

. CIFS'ye bağlı bir samba paylaşımında bir proje hazırladım. Bir Linux çekirdeği ile derleme yapıldı, ancak başka bir Linux çekirdeği (2.6.32.5) kullanılarak benzer bir hata mesajı aldım: "Tanımlanmış veri türü için çok büyük değer". Önerilen "nounix, noserverino" CIFS montaj seçeneğini kullandığımda sorun giderildi. Bu durumda, CIFS montajında ​​bir sorun var, bu yüzden büyük dosyalar olmadığı için hata mesajı yanıltıcıdır.