compile error when including stdio.h in C++ code
Khem Raj
raj.khem at gmail.com
Fri Aug 19 21:55:27 PDT 2011
Hi
I am seeing compilation failures like below on latest master
$ /usr/bin/g++ a.cpp -c -isystem /tmp/usr/include/bsd/ -DLIBBSD_OVERLAY
In file included from /usr/include/c++/4.5/fstream:43:0,
from a.cpp:1:
/usr/include/c++/4.5/cstdio:96:11: error: ‘::fpos_t’ has not been declared
/usr/include/c++/4.5/cstdio:98:11: error: ‘::clearerr’ has not been declared
/usr/include/c++/4.5/cstdio:99:11: error: ‘::fclose’ has not been declared
/usr/include/c++/4.5/cstdio:100:11: error: ‘::feof’ has not been declared
/usr/include/c++/4.5/cstdio:101:11: error: ‘::ferror’ has not been declared
/usr/include/c++/4.5/cstdio:102:11: error: ‘::fflush’ has not been declared
/usr/include/c++/4.5/cstdio:103:11: error: ‘::fgetc’ has not been declared
/usr/include/c++/4.5/cstdio:104:11: error: ‘::fgetpos’ has not been declared
/usr/include/c++/4.5/cstdio:105:11: error: ‘::fgets’ has not been declared
/usr/include/c++/4.5/cstdio:106:11: error: ‘::fopen’ has not been declared
/usr/include/c++/4.5/cstdio:107:11: error: ‘::fprintf’ has not been declared
/usr/include/c++/4.5/cstdio:108:11: error: ‘::fputc’ has not been declared
/usr/include/c++/4.5/cstdio:109:11: error: ‘::fputs’ has not been declared
/usr/include/c++/4.5/cstdio:110:11: error: ‘::fread’ has not been declared
/usr/include/c++/4.5/cstdio:111:11: error: ‘::freopen’ has not been declared
/usr/include/c++/4.5/cstdio:112:11: error: ‘::fscanf’ has not been declared
/usr/include/c++/4.5/cstdio:113:11: error: ‘::fseek’ has not been declared
/usr/include/c++/4.5/cstdio:114:11: error: ‘::fsetpos’ has not been declared
/usr/include/c++/4.5/cstdio:115:11: error: ‘::ftell’ has not been declared
/usr/include/c++/4.5/cstdio:116:11: error: ‘::fwrite’ has not been declared
/usr/include/c++/4.5/cstdio:117:11: error: ‘::getc’ has not been declared
/usr/include/c++/4.5/cstdio:118:11: error: ‘::getchar’ has not been declared
/usr/include/c++/4.5/cstdio:119:11: error: ‘::gets’ has not been declared
/usr/include/c++/4.5/cstdio:120:11: error: ‘::perror’ has not been declared
/usr/include/c++/4.5/cstdio:121:11: error: ‘::printf’ has not been declared
/usr/include/c++/4.5/cstdio:122:11: error: ‘::putc’ has not been declared
/usr/include/c++/4.5/cstdio:123:11: error: ‘::putchar’ has not been declared
/usr/include/c++/4.5/cstdio:124:11: error: ‘::puts’ has not been declared
/usr/include/c++/4.5/cstdio:125:11: error: ‘::remove’ has not been declared
/usr/include/c++/4.5/cstdio:126:11: error: ‘::rename’ has not been declared
/usr/include/c++/4.5/cstdio:127:11: error: ‘::rewind’ has not been declared
/usr/include/c++/4.5/cstdio:128:11: error: ‘::scanf’ has not been declared
/usr/include/c++/4.5/cstdio:129:11: error: ‘::setbuf’ has not been declared
/usr/include/c++/4.5/cstdio:130:11: error: ‘::setvbuf’ has not been declared
/usr/include/c++/4.5/cstdio:131:11: error: ‘::sprintf’ has not been declared
/usr/include/c++/4.5/cstdio:132:11: error: ‘::sscanf’ has not been declared
/usr/include/c++/4.5/cstdio:133:11: error: ‘::tmpfile’ has not been declared
/usr/include/c++/4.5/cstdio:134:11: error: ‘::tmpnam’ has not been declared
/usr/include/c++/4.5/cstdio:135:11: error: ‘::ungetc’ has not been declared
/usr/include/c++/4.5/cstdio:136:11: error: ‘::vfprintf’ has not been declared
/usr/include/c++/4.5/cstdio:137:11: error: ‘::vprintf’ has not been declared
/usr/include/c++/4.5/cstdio:138:11: error: ‘::vsprintf’ has not been declared
/usr/include/c++/4.5/cstdio:167:11: error: ‘::snprintf’ has not been declared
/usr/include/c++/4.5/cstdio:168:11: error: ‘::vfscanf’ has not been declared
/usr/include/c++/4.5/cstdio:169:11: error: ‘::vscanf’ has not been declared
/usr/include/c++/4.5/cstdio:170:11: error: ‘::vsnprintf’ has not been declared
/usr/include/c++/4.5/cstdio:171:11: error: ‘::vsscanf’ has not been declared
/usr/include/c++/4.5/cstdio:178:22: error: ‘__gnu_cxx::snprintf’ has
not been declared
/usr/include/c++/4.5/cstdio:179:22: error: ‘__gnu_cxx::vfscanf’ has
not been declared
/usr/include/c++/4.5/cstdio:180:22: error: ‘__gnu_cxx::vscanf’ has not
been declared
/usr/include/c++/4.5/cstdio:181:22: error: ‘__gnu_cxx::vsnprintf’ has
not been declared
/usr/include/c++/4.5/cstdio:182:22: error: ‘__gnu_cxx::vsscanf’ has
not been declared
In file included from /usr/include/c++/4.5/fstream:916:0,
from a.cpp:1:
/usr/include/c++/4.5/bits/fstream.tcc: In constructor
‘std::basic_filebuf<_CharT, _Traits>::basic_filebuf()’:
/usr/include/c++/4.5/bits/fstream.tcc:81:48: error: ‘BUFSIZ’ was not
declared in this scope
here is testcase
$ cat a.cpp
#include <fstream>
More information about the libbsd
mailing list