> Dear NG
>
[quoted text clipped - 30 lines]
> supported by CW (or at least only partially supported). However, I
> cannot figure where this happens and how to avoid it.
Checking /Developer/SDKs/MacOSX10.3.9.sdk and
/Developer/SDKs/MacOSX10.4u.sdk with:
find . -name "*stat.h" -print
shows that fstat isn't part of either SDK. Checking the MSL folder
inside the Codewarrior folder shows that it doesn't have an fstat.h
either.
Lastly, a check of /usr/include also fails to find an fstat.h
man fstat
shows that fstat wants:
#include <sys/types.h>
#include <sys/stat.h>
Adding those to a the HelloWorld.cp of a new "C++ console Mach-O" style
C++ project shows it compiles with no problems. (I've got
"OS X Volume" set to /Developer/SDKs/MacOSX10.3.9.sdk on the Source
Trees panel of the IDE preferences.
I also tried it with "OS X Volume" set to / in the project's
Preferences' Source Tree panel.
I can't make it fail!
François Robert - 06 Jul 2006 08:13 GMT
...
> fstat wants:
> #include <sys/types.h>
[quoted text clipped - 4 lines]
> (I've got "OS X Volume" set to /Developer/SDKs/MacOSX10.3.9.sdk
> on the Source Trees panel of the IDE preferences.)
My mistake(s) : The brain was thinking "stat" but the hand typed
"fstat"... I meant :
#include <stat.h>
But I think you pointed out the solution, too :
It should be (as documented) :
#include <sys/stat.h>
and not merely :
#include <stat.h>
and the access path should not contain the MSL_Extras part. That way, it
compiles (and run).
FYI : on my Mac I do have an MSL stat.h in
.../Metrowerks CodeWarrior/MSL/MSL_Extras/MSL_Common/Include/sys/stat.h
_______________________________________________________
François Robert
(to mail me, reverse character order in reply address)