Wireless Communication Library Support Forum
Frameworks => Bluetooth Framework => Topic started by: rdesgagn on May 08, 2013, 12:21:26 AM
-
Hello there,
I'm coding a dll that uses WCL. When I try to get the device address and name in CwclServer , I get this weird link error from Visual Studio 2005. I can only work in VS2005, there is no way I can upgrade to 2008 or newer.
error LNK2019: unresolved external symbol "__declspec(dllimport) public: class ATL::CStringT<unsigned short,class ATL::StrTraitATL<unsigned short,class ATL::ChTraitsCRT<unsigned short> > > __thiscall wcl::CwclCustomServerConnection::GetDeviceName(void)" (__imp_?GetDeviceName@CwclCustomServerConnection@wcl@@QAE?AV?$CStringT@GV?$StrTraitATL@GV?$ChTraitsCRT@G@ATL@@@ATL@@@ATL@@XZ) referenced in function "private: void __thiscall bluetoothCom::OnDisconnected(void *)" (?OnDisconnected@bluetoothCom@@AAEXPAX@Z)
I think the problem is related to ATLString being newer in the wcl.dll than what I have with Visual Studio 2005.
Thanks for your help,
Rene
-
WCL uses UNICODE. Change your project options to use UNICODE instead of MuliByte.
-
Hi Mike,
Even by modifying project options to use Unicode character set, I still get this error. Do you have any idea what it could be ?
Thanks
-
Hi Mike,
I check my Visual Studio project and every WCL functions that returns an ATL:CStringT has a linker error like this even if the unicode character is set in the project options :
bluetoothCom.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class ATL::CStringT<unsigned short,class ATL::StrTraitATL<unsigned short,class ATL::ChTraitsCRT<unsigned short> > > __thiscall wcl::CwclCustomServerConnection::GetDeviceName(void)" (__imp_?GetDeviceName@CwclCustomServerConnection@wcl@@QAE?AV?$CStringT@GV?$StrTraitATL@GV?$ChTraitsCRT@G@ATL@@@ATL@@@ATL@@XZ) referenced in function "private: void __thiscall bluetoothCom::OnDisconnected(void *)" (?OnDisconnected@bluetoothCom@@AAEXPAX@Z)
bluetoothCom.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class ATL::CStringT<unsigned short,class ATL::StrTraitATL<unsigned short,class ATL::ChTraitsCRT<unsigned short> > > __thiscall wcl::CwclAPI::GetVersion(void)" (__imp_?GetVersion@CwclAPI@wcl@@QAE?AV?$CStringT@GV?$StrTraitATL@GV?$ChTraitsCRT@G@ATL@@@ATL@@@ATL@@XZ) referenced in function "public: void __thiscall bluetoothCom::startAPI(void)" (?startAPI@bluetoothCom@@QAEXXZ)
Ren
-
Send me your project to mike@btframework.com I'll check it out
-
Sent !
-
Sorry but I have not recevied it.
-
Ok let's try another time.
Ren
-
Received and checked
Option "Treat wchar_t as Built-in Type" must be Yes.
-
Hi Mike,
It's compiling at least, will try to execute later today.
Thanks again !
Ren
-
You are welcome.