• 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: Compiler error on NSAddImage call
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiler error on NSAddImage call


  • Subject: Re: Compiler error on NSAddImage call
  • From: Cameron Hayne <email@hidden>
  • Date: Thu, 06 Nov 2003 00:02:57 -0500

On 5/11/03 1:28 PM, "Randy Croucher" <email@hidden> wrote:

> I can't seem to get the following line of code to compile.
>
>   const mach_header *mh = NSAddImage( "Hello",
> NSADDIMAGE_OPTION_RETURN_ON_ERROR );
>
> I get the following compiler error:
> main.c:6: error: syntax error before '*' token

Does your file have a suffix .c or .cpp ?
In C, you need to use the two word name for the type:
struct mach_header

--
Cameron Hayne (email@hidden)
Hayne of Tintagel
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Compiler error on NSAddImage call
      • From: Randy Croucher <email@hidden>
References: 
 >Compiler error on NSAddImage call (From: Randy Croucher <email@hidden>)

  • Prev by Date: Re: Archives (was CVS and Committing A Project)
  • Next by Date: Re: frameworks and headers
  • Previous by thread: Compiler error on NSAddImage call
  • Next by thread: Re: Compiler error on NSAddImage call
  • Index(es):
    • Date
    • Thread