• 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
Obj-C with C problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Obj-C with C problems


  • Subject: Obj-C with C problems
  • From: Daniel Gregg <email@hidden>
  • Date: Wed, 23 May 2001 22:32:30 -0500

This may well be a bone-head question but I keep fighting with massive
errors. Look at the code below and tell me why it will not compile if
the red lines are in a separate .c file: I'm using PB with a standard
"new Cocoa" project default settings. I simply wanted to create some C
routines in a separate file but evidently I can't?

#import "MyObject.h"
#import <Carbon/Carbon.h>
void makenoise(void);

@implementation MyObject

- (IBAction)startCapture:(id)sender
{
makenoise();
}

- (void)awakeFromNib
{
makenoise();
}
@end

void makenoise (void)
{
SysBeep(2);
}


  • Follow-Ups:
    • Re: Obj-C with C problems
      • From: "R. Tony Goold" <email@hidden>
  • Prev by Date: Re: NSBrowser drag question
  • Next by Date: Re: Obj-C with C problems
  • Previous by thread: Re: NSBrowser drag question
  • Next by thread: Re: Obj-C with C problems
  • Index(es):
    • Date
    • Thread