• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
PCH not being used
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PCH not being used


  • Subject: PCH not being used
  • From: Burt Johnson <email@hidden>
  • Date: Sun, 22 Jan 2006 12:38:08 -0800

Absolute newbie issue here.  I have never used XCode before,  have been
handed a VC++ (Windows) program and asked to convert it to create a Mac
version.

I used the XCode app wizard to create a 'cocoa application' named FitSync.
I then moved my existing code into the the organization the wizard created.
Tried to build, and got the expected errors complaining about such keywords
as BYTE, DWORD, etc.

I added typedef for those items into 'FitSync_Prefix.pch' (the file was
created by the wizard).  Tried to build again... and the same problems are
reported?  Looks like the pch is not being used.  I thought the wizard
would have made all the necessary link ups.

Looking this up in the documentation, I find the following:

>>>>>>>>>>>>>
Once you have created the prefix header, you need to set up your target to
precompile that header. To do this, you must provide values for the two
build settings described here. You can edit these build settings in the
Build pane of the target inspector or Info window. The settings you need to
change are:

	*	Prefix Header (GCC_PREFIX_HEADER). Change the value of this
build setting to the project-relative path of the prefix header file. If
you have a precompiled header file from an existing project, set the prefix
header path to the path to that file.

	*	Precompile Prefix Header (GCC_PRECOMPILE_PREFIX_HEADER).
Make sure that this option is turned on. A checkmark is present in the
Value column if this option is enabled.
<<<<<<<<<<<<

Unfortunately, I don't find anything even remotely like that in the
info->build pane?

To be sure I haven't done something stupid in the pch, here are the first
few lines from that file.  I am expecting this to result in no more
complaints for BYTE, DWORD, etc.

>>>>>>>>>>>>>>>
#ifdef __OBJC__
    #import <Cocoa/Cocoa.h>

	typedef unsigned char	BYTE;
	typedef	unsigned long	DWORD;
	typedef	unsigned short	WORD;
	typedef	UInt64			UINT64;

#define INVALID_HANDLE_VALUE    nil
#define GetTickCount()  TickCount()
#define LATER_THAN(testTime)		(((long)(testTime) -
(long)TickCount()) <= 0)

<<<<<<<<<<<<<<<
--


- Burt Johnson
  MindStorm, Inc.
  email@hidden
  http://www.mindstorm-inc.com
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: PCH not being used
      • From: Chris Hanson <email@hidden>
    • Re: PCH not being used
      • From: Jeff LaMarche <email@hidden>
  • Prev by Date: NSWorkspace ... launchApplication
  • Next by Date: Re: NSWorkspace ... launchApplication
  • Previous by thread: Re: NSWorkspace ... launchApplication
  • Next by thread: Re: PCH not being used
  • Index(es):
    • Date
    • Thread