Guys,
I have a problem on building leveldb on winxp.
From msys shell:
TARGET_OS=NATIVE_WINDOWS make libleveldb.a libmemenv.a$ TARGET_OS=NATIVE_WINDOWS make libleveldb.a libmemenv.a
g++ -I. -I./include -fno-builtin-memcmp -D_REENTRANT -DOS_WINDOWS -DLEVELDB_PLAT
FORM_WINDOWS -DWINVER=0x0500 -D__USE_MINGW_ANSI_STDIO=1 -O2 -DNDEBUG -c d
b/builder.cc -o db/builder.o
In file included from db/builder.cc:7:
./db/filename.h:10:20: stdint.h: No such file or directory
In file included from db/builder.cc:7:
./db/filename.h:33: error: `uint64_t' has not been declared
./db/filename.h:33: error: ISO C++ forbids declaration of `number' with no type
./db/filename.h:38: error: `uint64_t' has not been declared
./db/filename.h:38: error: ISO C++ forbids declaration of `number' with no type
./db/filename.h:43: error: `uint64_t' has not been declared
./db/filename.h:43: error: ISO C++ forbids declaration of `number' with no type
./db/filename.h:49: error: `uint64_t' has not been declared
./db/filename.h:49: error: ISO C++ forbids declaration of `number' with no type
./db/filename.h:62: error: `uint64_t' has not been declared
./db/filename.h:62: error: ISO C++ forbids declaration of `number' with no type
./db/filename.h:74: error: `uint64_t' has not been declared
./db/filename.h:75: error: ISO C++ forbids declaration of `number' with no type
./db/filename.h:80: error: `uint64_t' has not been declared
./db/filename.h:80: error: ISO C++ forbids declaration of `descriptor_number' wi
th no type
In file included from ./db/dbformat.h:10,
from db/builder.cc:8:
./include/leveldb/db.h:129: error: `uint64_t' has not been declared
./include/leveldb/db.h:129: error: ISO C++ forbids declaration of `sizes' with n
o type
In file included from ./db/dbformat.h:13,
from db/builder.cc:8:
./include/leveldb/table_builder.h:71: error: `uint64_t' does not name a type
./include/leveldb/table_builder.h:75: error: `uint64_t' does not name a type
In file included from ./db/dbformat.h:14,
from db/builder.cc:8:
./util/coding.h:22: error: `uint32_t' has not been declared
./util/coding.h:22: error: ISO C++ forbids declaration of `value' with no type
./util/coding.h:23: error: `uint64_t' has not been declared
./util/coding.h:23: error: ISO C++ forbids declaration of `value' with no type
./util/coding.h:24: error: `uint32_t' has not been declared
./util/coding.h:24: error: ISO C++ forbids declaration of `value' with no type
./util/coding.h:25: error: `uint64_t' has not been declared
./util/coding.h:25: error: ISO C++ forbids declaration of `value' with no type
./util/coding.h:30: error: `uint32_t' has not been declared
./util/coding.h:30: error: ISO C++ forbids declaration of `value' with no type
./util/coding.h:31: error: `uint64_t' has not been declared
./util/coding.h:31: error: ISO C++ forbids declaration of `value' with no type
./util/coding.h:38: error: `uint32_t' has not been declared
./util/coding.h:38: error: ISO C++ forbids declaration of `v' with no type
./util/coding.h:39: error: `uint64_t' has not been declared
./util/coding.h:39: error: ISO C++ forbids declaration of `v' with no type
./util/coding.h:42: warning: `VarintLength' initialized and declared `extern'
./util/coding.h:42: error: `uint64_t' was not declared in this scope
./util/coding.h:46: error: `uint32_t' has not been declared
./util/coding.h:46: error: ISO C++ forbids declaration of `value' with no type
./util/coding.h:47: error: `uint64_t' has not been declared
./util/coding.h:47: error: ISO C++ forbids declaration of `value' with no type
./util/coding.h:52: error: `uint32_t' has not been declared
./util/coding.h:52: error: ISO C++ forbids declaration of `value' with no type
./util/coding.h:53: error: `uint64_t' has not been declared
./util/coding.h:53: error: ISO C++ forbids declaration of `value' with no type
./util/coding.h:58: error: `uint32_t' does not name a type
./util/coding.h:72: error: `uint64_t' does not name a type
./util/coding.h:88: error: `uint32_t' has not been declared
./util/coding.h:88: error: ISO C++ forbids declaration of `value' with no type
./util/coding.h:91: error: `uint32_t' has not been declared
./util/coding.h:91: error: ISO C++ forbids declaration of `value' with no type
./util/coding.h: In function `const char* leveldb::GetVarint32Ptr(const char*, c
onst char*, int*)':
./util/coding.h:93: error: `uint32_t' undeclared (first use this function)
./util/coding.h:93: error: (Each undeclared identifier is reported only once for
each function it appears in.)
./util/coding.h:93: error: expected `;' before "result"
./util/coding.h:94: error: `result' undeclared (first use this function)
In file included from ./db/dbformat.h:15,
from db/builder.cc:8:
./util/logging.h: At global scope:
./util/logging.h:22: error: `uint64_t' has not been declared
./util/logging.h:22: error: ISO C++ forbids declaration of `num' with no type
./util/logging.h:29: warning: `NumberToString' initialized and declared `extern'
./util/logging.h:29: error: `uint64_t' was not declared in this scope
./util/logging.h:43: error: `uint64_t' has not been declared
./util/logging.h:43: error: ISO C++ forbids declaration of `val' with no type
In file included from db/builder.cc:8:
./db/dbformat.h:63: error: `uint64_t' does not name a type
./db/dbformat.h:67: error: `SequenceNumber' does not name a type
./db/dbformat.h:72: error: `SequenceNumber' does not name a type
./db/dbformat.h:76: error: expected `,' or `...' before '&' token
./db/dbformat.h:77: error: ISO C++ forbids declaration of `SequenceNumber' with
no type
./db/dbformat.h: In constructor `leveldb::ParsedInternalKey::ParsedInternalKey(c
onst leveldb::Slice&, int)':
./db/dbformat.h:77: error: class `leveldb::ParsedInternalKey' does not have any
field named `sequence'
./db/dbformat.h:77: error: `seq' undeclared (first use this function)
./db/dbformat.h:77: error: `t' undeclared (first use this function)
./db/dbformat.h: In function `leveldb::ValueType leveldb::ExtractValueType(const
leveldb::Slice&)':
./db/dbformat.h:106: error: `uint64_t' undeclared (first use this function)
./db/dbformat.h:106: error: expected `;' before "num"
./db/dbformat.h:107: error: `num' undeclared (first use this function)
./db/dbformat.h: At global scope:
./db/dbformat.h:149: error: `SequenceNumber' has not been declared
./db/dbformat.h:149: error: ISO C++ forbids declaration of `s' with no type
./db/dbformat.h: In constructor `leveldb::InternalKey::InternalKey(const leveldb
::Slice&, int, leveldb::ValueType)':
./db/dbformat.h:150: error: no matching function for call to `leveldb::ParsedInt
ernalKey::ParsedInternalKey(const leveldb::Slice&, int&, leveldb::ValueType&)'
./db/dbformat.h:70: note: candidates are: leveldb::ParsedInternalKey::ParsedInte
rnalKey(const leveldb::ParsedInternalKey&)
./db/dbformat.h:77: note: leveldb::ParsedInternalKey::ParsedInte
rnalKey(const leveldb::Slice&, int)
./db/dbformat.h:75: note: leveldb::ParsedInternalKey::ParsedInte
rnalKey()
./db/dbformat.h: In function `bool leveldb::ParseInternalKey(const leveldb::Slic
e&, leveldb::ParsedInternalKey*)':
./db/dbformat.h:180: error: `uint64_t' undeclared (first use this function)
./db/dbformat.h:180: error: expected `;' before "num"
./db/dbformat.h:181: error: `num' undeclared (first use this function)
./db/dbformat.h:182: error: 'struct leveldb::ParsedInternalKey' has no member na
med 'sequence'
./db/dbformat.h: At global scope:
./db/dbformat.h:193: error: `SequenceNumber' has not been declared
./db/dbformat.h:193: error: ISO C++ forbids declaration of `sequence' with no ty
pe
In file included from ./db/table_cache.h:13,
from db/builder.cc:9:
./include/leveldb/cache.h:82: error: `uint64_t' does not name a type
In file included from ./db/table_cache.h:14,
from db/builder.cc:9:
./include/leveldb/table.h:40: error: `uint64_t' has not been declared
./include/leveldb/table.h:41: error: ISO C++ forbids declaration of `file_size'
with no type
./include/leveldb/table.h:56: error: `uint64_t' does not name a type
In file included from db/builder.cc:9:
./db/table_cache.h:34: error: `uint64_t' has not been declared
./db/table_cache.h:35: error: `uint64_t' has not been declared
./db/table_cache.h:36: error: ISO C++ forbids declaration of `file_number' with
no type
./db/table_cache.h:36: error: ISO C++ forbids declaration of `file_size' with no
type
./db/table_cache.h:41: error: `uint64_t' has not been declared
./db/table_cache.h:42: error: `uint64_t' has not been declared
./db/table_cache.h:45: error: ISO C++ forbids declaration of `file_number' with
no type
./db/table_cache.h:45: error: ISO C++ forbids declaration of `file_size' with no
type
./db/table_cache.h:48: error: `uint64_t' has not been declared
./db/table_cache.h:48: error: ISO C++ forbids declaration of `file_number' with
no type
./db/table_cache.h:56: error: `uint64_t' has not been declared
./db/table_cache.h:56: error: `uint64_t' has not been declared
./db/table_cache.h:56: error: ISO C++ forbids declaration of `file_number' with
no type
./db/table_cache.h:56: error: ISO C++ forbids declaration of `file_size' with no
type
In file included from db/builder.cc:10:
./db/version_edit.h:20: error: `uint64_t' does not name a type
./db/version_edit.h:21: error: `uint64_t' does not name a type
./db/version_edit.h: In constructor `leveldb::FileMetaData::FileMetaData()':
./db/version_edit.h:25: error: class `leveldb::FileMetaData' does not have any f
ield named `file_size'
./db/version_edit.h: At global scope:
./db/version_edit.h:39: error: `uint64_t' has not been declared
./db/version_edit.h:39: error: ISO C++ forbids declaration of `num' with no type
./db/version_edit.h:43: error: `uint64_t' has not been declared
./db/version_edit.h:43: error: ISO C++ forbids declaration of `num' with no type
./db/version_edit.h:47: error: `uint64_t' has not been declared
./db/version_edit.h:47: error: ISO C++ forbids declaration of `num' with no type
./db/version_edit.h:51: error: `SequenceNumber' has not been declared
./db/version_edit.h:51: error: ISO C++ forbids declaration of `seq' with no type
./db/version_edit.h:62: error: `uint64_t' has not been declared
./db/version_edit.h:63: error: `uint64_t' has not been declared
./db/version_edit.h:65: error: ISO C++ forbids declaration of `file' with no typ
e
./db/version_edit.h:65: error: ISO C++ forbids declaration of `file_size' with n
o type
./db/version_edit.h:75: error: `uint64_t' has not been declared
./db/version_edit.h:75: error: ISO C++ forbids declaration of `file' with no typ
e
./db/version_edit.h:87: error: `uint64_t' was not declared in this scope
./db/version_edit.h:87: error: template argument 2 is invalid
./db/version_edit.h:87: error: template argument 1 is invalid
./db/version_edit.h:87: error: template argument 2 is invalid
./db/version_edit.h:87: error: template argument 3 is invalid
./db/version_edit.h:87: error: ISO C++ forbids declaration of `DeletedFileSet' w
ith no type
./db/version_edit.h:90: error: `uint64_t' does not name a type
./db/version_edit.h:91: error: `uint64_t' does not name a type
./db/version_edit.h:92: error: `uint64_t' does not name a type
./db/version_edit.h:93: error: `SequenceNumber' does not name a type
./db/version_edit.h: In member function `void leveldb::VersionEdit::SetLogNumber
(int)':
./db/version_edit.h:41: error: `log_number_' undeclared (first use this function
)
./db/version_edit.h: In member function `void leveldb::VersionEdit::SetPrevLogNu
mber(int)':
./db/version_edit.h:45: error: `prev_log_number_' undeclared (first use this fun
ction)
./db/version_edit.h: In member function `void leveldb::VersionEdit::SetNextFile(
int)':
./db/version_edit.h:49: error: `next_file_number_' undeclared (first use this fu
nction)
./db/version_edit.h: In member function `void leveldb::VersionEdit::SetLastSeque
nce(int)':
./db/version_edit.h:53: error: `last_sequence_' undeclared (first use this funct
ion)
./db/version_edit.h: In member function `void leveldb::VersionEdit::AddFile(int,
int, int, const leveldb::InternalKey&, const leveldb::InternalKey&)':
./db/version_edit.h:67: error: 'struct leveldb::FileMetaData' has no member name
d 'number'
./db/version_edit.h:68: error: 'struct leveldb::FileMetaData' has no member name
d 'file_size'
./db/version_edit.h: In member function `void leveldb::VersionEdit::DeleteFile(i
nt, int)':
./db/version_edit.h:76: error: request for member `insert' in `((leveldb::Versio
nEdit*)this)->leveldb::VersionEdit::deleted_files_', which is of non-class type
`int'
In file included from db/builder.cc:12:
./include/leveldb/env.h: At global scope:
./include/leveldb/env.h:91: error: `uint64_t' has not been declared
./include/leveldb/env.h:91: error: ISO C++ forbids declaration of `file_size' wi
th no type
./include/leveldb/env.h:143: error: `uint64_t' does not name a type
./include/leveldb/env.h:177: error: `uint64_t' has not been declared
./include/leveldb/env.h:177: error: ISO C++ forbids declaration of `n' with no t
ype
./include/leveldb/env.h:200: error: `uint64_t' has not been declared
./include/leveldb/env.h:201: error: ISO C++ forbids declaration of `offset' with
no type
./include/leveldb/env.h:299: error: `uint64_t' has not been declared
./include/leveldb/env.h:299: error: ISO C++ forbids declaration of `s' with no t
ype
./include/leveldb/env.h:321: error: `uint64_t' does not name a type
db/builder.cc: In function `leveldb::Status leveldb::BuildTable(const std::strin
g&, leveldb::Env*, const leveldb::Options&, leveldb::TableCache*, leveldb::Itera
tor*, leveldb::FileMetaData*)':
db/builder.cc:24: error: 'struct leveldb::FileMetaData' has no member named 'fil
e_size'
db/builder.cc:27: error: 'struct leveldb::FileMetaData' has no member named 'num
ber'
db/builder.cc:47: error: 'struct leveldb::FileMetaData' has no member named 'fil
e_size'
db/builder.cc:47: error: 'class leveldb::TableBuilder' has no member named 'File
Size'
db/builder.cc:68: error: 'struct leveldb::FileMetaData' has no member named 'num
ber'
db/builder.cc:69: error: 'struct leveldb::FileMetaData' has no member named 'fil
e_size'
db/builder.cc:80: error: 'struct leveldb::FileMetaData' has no member named 'fil
e_size'
make: *** [db/builder.o] Error 1
I think the relevant error is:
In file included from db/builder.cc:7:
./db/filename.h:10:20: stdint.h: No such file or directoryDo I need some special configuration?
msys is in PATH configuration