title: Class in ObjectiveC doesn't seem to recognize inherited messages
body: <p>I'm learning ObjectiveC with "Programming in Objective C" by Stephen G Kochan and I'm having some difficulties with an example. It creates a simple Fraction class that inherits from Object.  That's where I get into trouble, when I try to send messages that are understood by Object instead of Fraction, such as init, alloc or free (see code below):</p>
  
  <pre><code>// Fraction
  #import &lt;stdio.h&gt;
  #import &lt;objc/Object.h&gt; // base object
  
  // @interface section
  @interface Fraction: Object
  {
      int numerator;
      int denominator;
  }
  
  - (void) print;
  - (void) setNumerator: (int) n;
  - (void) setDenominator: (int) d;
  
  @end
  
  
  // @implementation section
  
  @implementation Fraction;
  
  -(void) print
  {
      printf(" %i/%i ", numerator, denominator);
  }
  
  -(void) setNumerator: (int) n
  {
      numerator = n;
  }
  
  -(void) setDenominator: (int) d
  {
      denominator = d;
  }
  
  @end
  
  // Program section
  
  int main( int argc, char *argv[])
  {
      Fraction *myFraction;
  
      // Create Instance of fraction 
      myFraction = [Fraction alloc];
      myFraction = [Fraction init];
  
      // Set fraction to 1/3
      [myFraction setNumerator: 1];
      [myFraction setDenominator: 3];
  
  
      // Display the fraction
      printf("The value of my fraction is: ");
      [myFraction print];
      printf("\n");
  
  
      // Destroy the instance
      [myFraction free];
  
  
      return 0;
  }
  </code></pre>
  
  <p>When I compile it:
  <code>gcc fraction.m -o fraction -l objc</code></p>
  
  <p>I get the following warnings:</p>
  
  <pre><code>fraction.m: In function ‘main’:
  fraction.m:47: warning: ‘Fraction’ may not respond to ‘+alloc’
  fraction.m:47: warning: (Messages without a matching method signature
  fraction.m:47: warning: will be assumed to return ‘id’ and accept
  fraction.m:47: warning: ‘...’ as arguments.)
  fraction.m:48: warning: ‘Fraction’ may not respond to ‘+init’
  fraction.m:62: warning: ‘Fraction’ may not respond to ‘-free’
  fernando@McFofo ~/code/learning objective c:: ./fraction 
  objc[1678]: Fraction: Does not recognize selector forward::
  </code></pre>
  
  <p>and the program, when run, complains about an illegal instruction…</p>
  
  <p>Anybody knows what's going on?</p>