WhatMeWorry
2005.06.22, 12:51 PM
This area is always biting me, and I must be doing something basically wrong.
I download an Apple code example. I'm interested in stepping though the code
to learn what's going on, and I also want to get familiar with Xcode as well, so
I create a new project and populate it with the downloaded files.
I'm down to just one compile error:
FilterExport.c:20: error: parse error before "GWorldPtr"
PixMapHandle hPixMap = GetGWorldPixMap(static_cast<GWorldPtr>(inDataPtr));
Ok, I don't have a declaration of the data type PixMapHandle
So I go to Apple developer documentation and find the PixMapHandle in
QuickDraw Reference Document. It says
-------------------------------------------------------------------------
Framework: ApplicationServices/ApplicationsServices.h
Header: Quickdraw.h QDOffscreen.h QDPictToCGContext.h
Availability
Available in CarbonLib 1.0 and later when running Mac OS 8.1 or later. Available in
Mac OS X version 10.0 and later.
-------------------------------------------------------------------------
Alright, so I try to #include <Quickdraw.h>
and I tried #include <QD/Quickdraw.h>
(by the way, what is the QD/ in front of Quickdraw? That's not a directory is it?)
and I get error message: Quickdraw.h: No such file or directory
And I've tried all the other headers above. I even tried including <ApplicationServices/ApplicationsServices.h>
So I'm stuck. What would a reasonable (that is, not me) person do
in this situation?
-----------------------------------------------------------------------
As an aside, I did get the following bit of code to compiling
#include <QuickTime/QuickTime.h> // declares/defines GraphicsImportComponent
GraphicsImportComponent backgroundImporter = 0, foregroundImporter = 0;
So I go into the Finder and pull up all the QuickTime.h files on my system.
Inside then, some have just the the one line:
#include <QuickTime/QuickTime.h>
Others have
#ifndef __CARBON__
#include <Carbon/Carbon.h>
#endif
followed by even more includes.
I download an Apple code example. I'm interested in stepping though the code
to learn what's going on, and I also want to get familiar with Xcode as well, so
I create a new project and populate it with the downloaded files.
I'm down to just one compile error:
FilterExport.c:20: error: parse error before "GWorldPtr"
PixMapHandle hPixMap = GetGWorldPixMap(static_cast<GWorldPtr>(inDataPtr));
Ok, I don't have a declaration of the data type PixMapHandle
So I go to Apple developer documentation and find the PixMapHandle in
QuickDraw Reference Document. It says
-------------------------------------------------------------------------
Framework: ApplicationServices/ApplicationsServices.h
Header: Quickdraw.h QDOffscreen.h QDPictToCGContext.h
Availability
Available in CarbonLib 1.0 and later when running Mac OS 8.1 or later. Available in
Mac OS X version 10.0 and later.
-------------------------------------------------------------------------
Alright, so I try to #include <Quickdraw.h>
and I tried #include <QD/Quickdraw.h>
(by the way, what is the QD/ in front of Quickdraw? That's not a directory is it?)
and I get error message: Quickdraw.h: No such file or directory
And I've tried all the other headers above. I even tried including <ApplicationServices/ApplicationsServices.h>
So I'm stuck. What would a reasonable (that is, not me) person do
in this situation?
-----------------------------------------------------------------------
As an aside, I did get the following bit of code to compiling
#include <QuickTime/QuickTime.h> // declares/defines GraphicsImportComponent
GraphicsImportComponent backgroundImporter = 0, foregroundImporter = 0;
So I go into the Finder and pull up all the QuickTime.h files on my system.
Inside then, some have just the the one line:
#include <QuickTime/QuickTime.h>
Others have
#ifndef __CARBON__
#include <Carbon/Carbon.h>
#endif
followed by even more includes.