cryingraven
Registered
I downloaded an SDK a while back, extracted the files, opened the xcode project file and hit the build button and it compiled with no problems of any kind...on Panther.
Now, a couple of months later, I have installed Tiger and am trying to compile the exact same code, extracted from the same archive from the same CD I put it on back then.
Now for some reason I get 20 errors. In fact it is only 10 pairs of errors:
Invalid use of stuct with unknown type
followed by
Error: forward declare of class ResManager
I then proceed to comment out all lines that actually call the object but leave the declaration intact. It then compiles without that problem, but then gives me loads of other errors in another file. I assume that if I comment out all the error giving commands that it will give me errors in other files since the actual error that are reported are 4 errors per line and the stuff it mentions doesn't even exist in the line.
Stuff like:
ThisResource = Offset(resourcelist,sizeof(resource));
gives an error along the lines of:
Error: -> cannot appear in constant expression
Error: & cannot appear in constant expression
Error: enumerator value for <something> not integer constant
I assume that the Offset function contains all these problems.
Anyway, the code was the first code I ever compiled out of the box and now it gives me loads of errors. Why? What makes tiger's xcode so differnt from panther's xcode and how do I fix it?
Some further info:
In my .h file:
class ResManger;
extern ResManger *ResourceManager;
void someClass::function1()
{
ResourceManager->somefunction();
}
class Resmanager()
{
...
};
In my .cpp file:
ResManager *ResourceManager;
The line ResourceManager->somefunction();
causes the error messages relating to the forward declaration.
Now, a couple of months later, I have installed Tiger and am trying to compile the exact same code, extracted from the same archive from the same CD I put it on back then.
Now for some reason I get 20 errors. In fact it is only 10 pairs of errors:
Invalid use of stuct with unknown type
followed by
Error: forward declare of class ResManager
I then proceed to comment out all lines that actually call the object but leave the declaration intact. It then compiles without that problem, but then gives me loads of other errors in another file. I assume that if I comment out all the error giving commands that it will give me errors in other files since the actual error that are reported are 4 errors per line and the stuff it mentions doesn't even exist in the line.
Stuff like:
ThisResource = Offset(resourcelist,sizeof(resource));
gives an error along the lines of:
Error: -> cannot appear in constant expression
Error: & cannot appear in constant expression
Error: enumerator value for <something> not integer constant
I assume that the Offset function contains all these problems.
Anyway, the code was the first code I ever compiled out of the box and now it gives me loads of errors. Why? What makes tiger's xcode so differnt from panther's xcode and how do I fix it?
Some further info:
In my .h file:
class ResManger;
extern ResManger *ResourceManager;
void someClass::function1()
{
ResourceManager->somefunction();
}
class Resmanager()
{
...
};
In my .cpp file:
ResManager *ResourceManager;
The line ResourceManager->somefunction();
causes the error messages relating to the forward declaration.