Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. problem in linking bluetooth related header files in VC++

problem in linking bluetooth related header files in VC++

Scheduled Pinned Locked Moved C / C++ / MFC
c++helptutorial
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    manju23reddy
    wrote on last edited by
    #1

    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...

    _ D 2 Replies Last reply
    0
    • M manju23reddy

      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...

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      Did you specify the name of the library in linker settings?

      Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

      M D 2 Replies Last reply
      0
      • _ _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_

        M Offline
        M Offline
        manju23reddy
        wrote on last edited by
        #3

        yes i have set the additional libraries to my sdk path but even then it is same.

        1 Reply Last reply
        0
        • _ _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_

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • M manju23reddy

            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...

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups