I've been playing around with the bluetooth framework now that I have a couple usb adaptors in hand.
It seems like the only functions you can use with the current preview 2 SDK are the objective-c ones. Unfortunately, the more interesting functions are in the straight c++ header files (notably IOBluetoothUserLib.h).
Attempting to compile the following program results in a linker error:
#include <IOBluetooth/IOBluetoothUserLib.h>
int main (int argc, const char * argv[]) {
NumVersion *testVer;
BluetoothHCIVersionInfo *testInfo;
IOBluetoothGetVersion(testVer, testInfo);
}
---
root# g++ test.c -framework IOBluetooth
/usr/bin/ld: Undefined symbols:
_IOBluetoothGetVersion__FP10NumVersionP23Bluetooth HCIVersionInfo
root#
---
Just to test my sanity, I tried the following program with OpenGL and it compiled fine:
#include <OpenGL/OpenGL.h>
int main (int argc, const char * argv[]) {
long *majorvers, *minorvers;
CGLGetVersion(majorvers, minorvers);
}
---
root# g++ test2.c -framework OpenGL
root#
Guess I'll have to wait until Jaguar?
-Cpt'n