Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Bluetooth framework incomplete

Bluetooth framework incomplete
Thread Tools
Fresh-Faced Recruit
Join Date: Jul 2002
Location: MD, USA
Status: Offline
Reply With Quote
Aug 10, 2002, 05:31 PM
 
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
     
Senior User
Join Date: Jan 2000
Status: Offline
Reply With Quote
Aug 10, 2002, 08:05 PM
 
Try adding #include <CoreFoundation/CoreFoundation.h> above the other #include, and compiling with gcc, not g++. Worked here.
     
Fresh-Faced Recruit
Join Date: Jul 2002
Location: MD, USA
Status: Offline
Reply With Quote
Aug 10, 2002, 10:17 PM
 
Thanks fitter!

Compiled for me too.. although running the program gives me an unexpected output (Bus error)

I'll play around with the other functions and see what happens.

-Cpt'n
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:09 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2