Here are the errors and warning I get compiling XBlockFile on LinuxPPC
with egcs:
In file included from XBlockFile.h:40,
from XBlockFile.cpp:35:
JokerUtilities.h:21: warning: `#pragma once' is obsolete
In file included from XBlockFile.h:40,
from XBlockFile.cpp:35:
JokerUtilities.h:32: stdexcept.h: No such file or directory
In file included from XEndianFile.h:40,
from XEndianFile.cpp:34:
JokerUtilities.h:21: warning: `#pragma once' is obsolete
In file included from XEndianFile.h:40,
from XEndianFile.cpp:34:
JokerUtilities.h:32: stdexcept.h: No such file or directory
In file included from XBlockFile.h:40,
from XBlockFile.cpp:35:
The header is named "stdexcept" There is no ".h" at the end. So says the
ANSI/ISO C++ standard. Accordingly, I don't have a "stdexcept.h"
JokerUtilities.h:21: warning: `#pragma once' is obsolete
XBlockFile.cpp: In method `void XBlockFile::WriteEmptyBlockFile()':
XBlockFile.cpp:244: warning: multi-character character constant
XBlockFile.cpp: In method `void XBlockFile::SaveFile()':
XBlockFile.cpp:667: warning: multi-character character constant
XBlockFile.cpp: In method `void XBlockFile::Compact()':
XBlockFile.cpp:861: warning: multi-character character constant
Multi-character constants are not allowed. Why are there any in XBlockFile?
We should do this in a compatable manner. An enum would be better -- one
that uses integers, not character constants.
XBlockFile.cpp:877: warning: comparison between signed and unsigned
A bug waiting to happen. The declaration should be "unsigned long bwx = 0"
And what kind of coding is that? What's wrong with a for loop? Why code
around it?
XBlockFile.cpp: In method `struct XBlockFileMapEntry * XBlockFile::SplitBlock(struct
XBlockFileMapEntry *, long unsigned int)':
XBlockFile.cpp:958: warning: multi-character character constant
Same.
XEndianFile.h: At top level:
XEndianFile.h:71: warning: `long int sTypeSizes[6]' defined but not used
XEndianFile.h:77: warning: `long int sTypeBounds[3]' defined but not used
What are these structs for? And powerc needs to be documented. Any other
preprocessor things to document? Hmmm.... I'll grep it.
DATA_CHUNK_SIZE -- self evident, but did not know about it with
-- grep.
PRAGMA_STRUCT_ALIGN -- normally defined by Apple's headers,
-- but you're fortunately not including them
TRUE -- these are C++ keywords. Try "true" and "false"
FALSE
__X_BLOCK_FILE__ -- these are reserved for use by the
__X_ENDIAN_FILE__ -- standards committee or library writers:
-- You're not allowed to start a preprocessor
-- symbols with an underscore. Use X_BLOCK_FILE_H
-- instead.
In file included from XEndianFile.h:40,
from XEndianFile.cpp:34:
JokerUtilities.h:21: warning: `#pragma once' is obsolete
/usr/lib/crt1.o(.text+0xb0): undefined reference to `main'
collect2: ld returned 1 exit status
Hmmm.... were we supposed to get a test suite?
--
Note: I'm on Linux, so this message will have funny headers.