problem in linking bluetooth related header files in VC++
-
hi i have written the bellow code to search the bluetooth device.
#include #include #include #include #include int main() { BLUETOOTH_DEVICE_SEARCH_PARAMS BluetoothSearchParams; BLUETOOTH_DEVICE_INFO BluetoothDeviceInfo; HBLUETOOTH_DEVICE_FIND hBluetoothDevice; ZeroMemory(&BluetoothSearchParams, sizeof(BluetoothSearchParams)); ZeroMemory(&BluetoothDeviceInfo, sizeof(BluetoothDeviceInfo)); BluetoothSearchParams.dwSize = sizeof(BLUETOOTH_DEVICE_SEARCH_PARAMS); BluetoothSearchParams.fReturnAuthenticated= true; BluetoothSearchParams.fReturnRemembered = true; BluetoothSearchParams.fReturnUnknown = true; BluetoothSearchParams.fReturnConnected = true; BluetoothSearchParams.fIssueInquiry = true; BluetoothSearchParams.cTimeoutMultiplier = 15; BluetoothSearchParams.hRadio = NULL; BluetoothDeviceInfo.dwSize = sizeof(BluetoothDeviceInfo); hBluetoothDevice = BluetoothFindFirstDevice(&BluetoothSearchParams, &BluetoothDeviceInfo); if (hBluetoothDevice != NULL) { while (true) { wprintf(L"Found a Bluetooth device!\n"); if (BluetoothFindNextDevice(hBluetoothDevice, &BluetoothDeviceInfo) == false) { break; } } } else { wprintf(L"Unable to find a Bluetooth device.\n"); } return 0; }
i have created new win32console project and written the above file i have sdk installed but while compiling it shows that files like bthdef.h & BluetoothAPIs.h & bthsdpdef.h not found.... how to set the project properties so that i can link the files form my sdk folder... -
hi i have written the bellow code to search the bluetooth device.
#include #include #include #include #include int main() { BLUETOOTH_DEVICE_SEARCH_PARAMS BluetoothSearchParams; BLUETOOTH_DEVICE_INFO BluetoothDeviceInfo; HBLUETOOTH_DEVICE_FIND hBluetoothDevice; ZeroMemory(&BluetoothSearchParams, sizeof(BluetoothSearchParams)); ZeroMemory(&BluetoothDeviceInfo, sizeof(BluetoothDeviceInfo)); BluetoothSearchParams.dwSize = sizeof(BLUETOOTH_DEVICE_SEARCH_PARAMS); BluetoothSearchParams.fReturnAuthenticated= true; BluetoothSearchParams.fReturnRemembered = true; BluetoothSearchParams.fReturnUnknown = true; BluetoothSearchParams.fReturnConnected = true; BluetoothSearchParams.fIssueInquiry = true; BluetoothSearchParams.cTimeoutMultiplier = 15; BluetoothSearchParams.hRadio = NULL; BluetoothDeviceInfo.dwSize = sizeof(BluetoothDeviceInfo); hBluetoothDevice = BluetoothFindFirstDevice(&BluetoothSearchParams, &BluetoothDeviceInfo); if (hBluetoothDevice != NULL) { while (true) { wprintf(L"Found a Bluetooth device!\n"); if (BluetoothFindNextDevice(hBluetoothDevice, &BluetoothDeviceInfo) == false) { break; } } } else { wprintf(L"Unable to find a Bluetooth device.\n"); } return 0; }
i have created new win32console project and written the above file i have sdk installed but while compiling it shows that files like bthdef.h & BluetoothAPIs.h & bthsdpdef.h not found.... how to set the project properties so that i can link the files form my sdk folder...Did you specify the name of the library in linker settings?
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
Did you specify the name of the library in linker settings?
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
yes i have set the additional libraries to my sdk path but even then it is same.
-
Did you specify the name of the library in linker settings?
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
It's not a linker problem. The compiler is complaining about not finding
.h
files"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
-
hi i have written the bellow code to search the bluetooth device.
#include #include #include #include #include int main() { BLUETOOTH_DEVICE_SEARCH_PARAMS BluetoothSearchParams; BLUETOOTH_DEVICE_INFO BluetoothDeviceInfo; HBLUETOOTH_DEVICE_FIND hBluetoothDevice; ZeroMemory(&BluetoothSearchParams, sizeof(BluetoothSearchParams)); ZeroMemory(&BluetoothDeviceInfo, sizeof(BluetoothDeviceInfo)); BluetoothSearchParams.dwSize = sizeof(BLUETOOTH_DEVICE_SEARCH_PARAMS); BluetoothSearchParams.fReturnAuthenticated= true; BluetoothSearchParams.fReturnRemembered = true; BluetoothSearchParams.fReturnUnknown = true; BluetoothSearchParams.fReturnConnected = true; BluetoothSearchParams.fIssueInquiry = true; BluetoothSearchParams.cTimeoutMultiplier = 15; BluetoothSearchParams.hRadio = NULL; BluetoothDeviceInfo.dwSize = sizeof(BluetoothDeviceInfo); hBluetoothDevice = BluetoothFindFirstDevice(&BluetoothSearchParams, &BluetoothDeviceInfo); if (hBluetoothDevice != NULL) { while (true) { wprintf(L"Found a Bluetooth device!\n"); if (BluetoothFindNextDevice(hBluetoothDevice, &BluetoothDeviceInfo) == false) { break; } } } else { wprintf(L"Unable to find a Bluetooth device.\n"); } return 0; }
i have created new win32console project and written the above file i have sdk installed but while compiling it shows that files like bthdef.h & BluetoothAPIs.h & bthsdpdef.h not found.... how to set the project properties so that i can link the files form my sdk folder...manju23reddy wrote:
how to set the project properties so that i can link the files form my sdk folder...
What version of VS are you using? With VS2005, click Options from the Tools menu. Open Projects and Solutions, and select VC++ Directories.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch