Domanda

I am writing a sample application in WindowsCE 6.0. I want to connect the handheld device to another bluetooth device and exchange data. I am following this link. But when the sample code is compiled I am getting these errors

1>BlueToothTestDlg.obj : error LNK2019: unresolved external symbol WSALookupServiceEnd referenced in function "public: void __cdecl CBlueToothTestDlg::OnBnClickedFdButton(void)" (?OnBnClickedFdButton@CBlueToothTestDlg@@QAAXXZ)

1>BlueToothTestDlg.obj : error LNK2019: unresolved external symbol WSALookupServiceNextW referenced in function "public: void __cdecl CBlueToothTestDlg::OnBnClickedFdButton(void)" (?OnBnClickedFdButton@CBlueToothTestDlg@@QAAXXZ)

1>BlueToothTestDlg.obj : error LNK2019: unresolved external symbol WSALookupServiceBeginW referenced in function "public: void __cdecl CBlueToothTestDlg::OnBnClickedFdButton(void)" (?OnBnClickedFdButton@CBlueToothTestDlg@@QAAXXZ) 1>FLEX7000_2450

(ARMV4I)\Debug\BlueToothTest.exe : fatal error LNK1120: 3 unresolved externals

I have included these headers

#include <Winsock2.h>
#include <Ws2bth.h>
#include <bt_sdp.h>
#include <bthapi.h>
#include <bt_api.h>
#include <winioctl.h>

When searched I found that it can be because the coredll.lib is missing. But I am not sure where to find it and how to include this?

Thanks

È stato utile?

Soluzione

I have found solution. I added Ws2.lib in Linker Input flags under project properties and now the app builds.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top