title: symbol(s) not found in XCode, Cocoa application
body: <p>Though I've done some development in Java and and a little in C(++), I'm totally new to Apple's Objective C and XCode.</p>
  
  <p>Thus, I'm totally stumped by the following error message:</p>
  
  <pre><code>Building target “BatteryApp” of project “BatteryApp” with configuration “Debug” — (1 error)
          cd /Users/soren/Documents/BatteryApp
      setenv MACOSX_DEPLOYMENT_TARGET 10.5
      /Developer/usr/bin/gcc-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -L/Users/soren/Documents/BatteryApp/build/Debug -F/Users/soren/Documents/BatteryApp/build/Debug -filelist /Users/soren/Documents/BatteryApp/build/BatteryApp.build/Debug/BatteryApp.build/Objects-normal/i386/BatteryApp.LinkFileList -mmacosx-version-min=10.5 -framework Cocoa -o /Users/soren/Documents/BatteryApp/build/Debug/BatteryApp.app/Contents/MacOS/BatteryApp
  Undefined symbols:
    "_IOPSCopyPowerSourcesList", referenced from:
        _main in main.o
  ld: symbol(s) not found
  collect2: ld returned 1 exit status
            "_IOPSCopyPowerSourcesList", referenced from:
                _main in main.o
          ld: symbol(s) not found
          collect2: ld returned 1 exit status
  </code></pre>
  
  <p>It's from a default Cocoa application, with main.m looking like so:</p>
  
  <pre><code>import &lt;Cocoa/Cocoa.h&gt;
  import &lt;IOKit/ps/IOPowerSources.h&gt;
  
  int main(int argc, char *argv[])
  {
      CFTypeRef powerInfo;
      IOPSCopyPowerSourcesList(powerInfo);
      NSLog(@"Foo");
      //return NSApplicationMain(argc,  (const char **) argv);
  }
  </code></pre>
  
  <p>(Remember - just getting my feet wet here... Learning by screwing up, mainly :))</p>
  
  <p>I'm guessing the IOKit lib isn't linked correctly (if I interpret the arcane musings of g++ correctly...), but I have no idea how to actually link it?</p>
  
  <p>Any help appreciated - also any links to nice tutorials on creating your own Objective C apps.</p>
  
  <p>Cheers!</p>