1) you need to go to the project properties (Project-> ProjectName Properties)
2) set the include directory (base_install_directory/BTH DK/SDK/Inc) under
the C/C++->General tab
3) set the additional library directory
(base_install_directory/BTH DK/SDK/Release) under the Linker->General
tab
4) add BtWdSdkLib.lib to the additional dependencies under the Linker->Input tab
Note that step 3 is different when programming for a 64 bit environment, you need to set the additional library directory to base_install_directory/BTH DK/SDK/Release/x64
When you create a Project, you need to include windows.h and BtIfDefinitions.h
The code for a simple app that does not but includes the necessary library and includes is:
#include iostream
#include windows.h
#include btifdefinitions.h
using namespace std;
int
main ()
{
return ( 0 );
}
Obviously none of this file has a purpose, it's just a basic template for a bluetooth app using the Widcomm SDK. Also, I had to cut out the <> for this post to avoid it viewing the include files as html code.
Monday, October 1, 2007
I have created a simple program using a Bluetooth programming book I recently purchased that listens for nearby devices. Also, I have used the samples to make a program to listen for devices and then connect to the device I want and send a simple message. All of this uses the MS Bluetooth stack. For the time being, though, I will be switching to using the Widcomm bluetooth stack. Also, I will try to use the BlueZ api to make the same apps in Linux.
With regard to the wiimote, I have thus far been unable to connect to the controller. Not quite sure what the problem is.
With regard to the wiimote, I have thus far been unable to connect to the controller. Not quite sure what the problem is.
Subscribe to:
Comments (Atom)