title: Xcode build failure "Undefined symbols for architecture x86_64"
body: <p>An Xcode beginner's question:</p>
  
  <p>It is my first experience with Xcode 4.6.3.</p>
  
  <p>I am trying to write a very simple console program, that searches for paired BT devices and prints them to an NSLog.</p>
  
  <p>It builds with the following error:</p>
  
  <pre><code>Undefined symbols for architecture x86_64:
    "_OBJC_CLASS_$_IOBluetoothDevice", referenced from:
        objc-class-ref in main.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  
  <p>I searched like crazy. The common problem should be a reference to a file, of which only the header files are imported and no implementation (*.m-file) is found by the linker. The IOBluetooth library is however, a standard Framework like the Foundation Framework.</p>
  
  <p>What am I missing in my above statement?</p>
  
  <p>I also have tried building it for a 32-bit machine (build fails again). It is clearly a linker error, however I have no idea, to what it relates, except that there is an issue with finding the implementation for IOBluetoothDevice, on both x86 and x64 architecture, while the header files are from a standard included Framework, called IOBluetooth?</p>
  
  <p>For your information my main code "main.m" being:</p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  #import &lt;IOBluetooth/objc/IOBluetoothDevice.h&gt;          // Note the import for bluetooth
  #import &lt;IOBluetooth/objc/IOBluetoothDeviceInquiry.h&gt;   // Note the import for bluetooth
  
  
  int main(int argc, const char * argv[])
  {
      @autoreleasepool {
          IOBluetoothDevice *currentDevice;
          NSArray *devices = [ IOBluetoothDevice pairedDevices];
  
  
          for (id currentDevice in devices){
            NSLog(@"%i : %@",[ currentDevice classOfDevice ], [ currentDevice name ]);    
          }
      }
      return 0;
  }
  </code></pre>
  
  <p>Thanks for any help or pointers to the right direction.</p>