• 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
Re: PCH not being used
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PCH not being used


  • Subject: Re: PCH not being used
  • From: Jeff LaMarche <email@hidden>
  • Date: Sun, 22 Jan 2006 16:10:00 -0500

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.


Burt:

I think the problem is that the pch file is a precompiled header. Since it's pre-compiled, any pre-compiler macros or definitions you put in it will be gone by the time you compile the rest of your code. You need to create a new header file (perhaps windefs.h?) with the definitions you need and then #import those into any code that will need them. The .pch file is just not the right place to put this.

Hope this helps.
Jeff


_______________________________________________ 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: Burt Johnson <email@hidden>
References: 
 >PCH not being used (From: Burt Johnson <email@hidden>)

  • Prev by Date: Re: NSWorkspace ... launchApplication
  • Next by Date: Re: NSWorkspace ... launchApplication
  • Previous by thread: PCH not being used
  • Next by thread: Re: PCH not being used
  • Index(es):
    • Date
    • Thread