davep1553
Posts: 2
Joined: Tue May 12, 2009 11:44 pm

New to Bluetooth and have issues

Wed May 13, 2009 12:03 am

Hello, I'm completely new to Bluetooth programing in windows and was struggling to get started, a friend directed be to BlueTools and I'm still struggling. I can't get the example to compile.

Basics first, I want to design a PC application in Visual Studio 2005 to talk to a bluetooth device using SPP.

I went to the example in libWindows first as I'm not using .net it provides project FindAndConnect

I load it, the editor converts it to this more recent compiler (don't know what it was originally made with) and when I hit compile I get the following

1>Compiling...
1>StdAfx.cpp
1> WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)
1>Compiling...
1>FindAndConnect.cpp
1>c:\program files\franson\bluetools sdk v1.21\libwindows\mfc\findandconnect\findandconnect.cpp(52) : <font color="yellow">warning C4996: 'CWinApp::Enable3dControls': CWinApp::Enable3dControls is no longer needed. You should remove this call.</font id="yellow">
1> c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h(4477) : see declaration of 'CWinApp::Enable3dControls'
1>FindAndConnectDlg.cpp
1>c:\program files\franson\bluetools sdk v1.21\libwindows\mfc\findandconnect\findandconnectdlg.cpp(178) : <font color="red">error C2660: 'xBlueTools::xNetwork::DiscoverDevicesAsync' : function does not take 0 arguments</font id="red">
1>Generating Code...
1>Build log was saved at "file://c:\Program Files\Franson\BlueTools SDK v1.21\libWindows\MFC\FindAndConnect\Debug\BuildLog.htm"
1>FindAndConnect - 1 error(s), 1 warning(s)


If I comment out the offending line I also get additional link errors

1> Creating library .\Debug/FindAndConnect.lib and object .\Debug/FindAndConnect.exp
1>LINK : <font color="yellow">warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library</font id="yellow">
1>StdAfx.obj : <font color="red">error LNK2001: unresolved external symbol "public: virtual wchar_t * __thiscall xCore::xString::GetBSTR(bool)" (?GetBSTR@xString@xCore@@UAEPA_W_N@Z)</font id="red">
1>.\Debug/FindAndConnect.exe : fatal error LNK1120: 1 unresolved externals
1>Build log was saved at "file://c:\Program Files\Franson\BlueTools SDK v1.21\libWindows\MFC\FindAndConnect\Debug\BuildLog.htm"
1>FindAndConnect - 2 error(s), 1 warning(s)

Please help, I've been trying for several days now to establish any sort of Bluetooth PC program without any success and am getting very frustrated.

User avatar
johan
GpsGate
Posts: 15342
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: New to Bluetooth and have issues

Thu May 14, 2009 7:52 pm

Consider using C# or VB.NET that will make life significant easier for you.

Regards,
Johan

Franson Support

davep1553
Posts: 2
Joined: Tue May 12, 2009 11:44 pm

RE: New to Bluetooth and have issues

Thu May 14, 2009 10:02 pm

I am not normally a windows programmer. I have little experience with windows programing and most of it dates back to VB6, and I have no C# experiance.

I am using Visual Studio 2005 Professional to design the application in C++ using MFC.

Besides my issue is the c++ example you provided doesn't even compile.

Return to “BlueTools”