User forums > Using Code::Blocks
Code::Blocks and Windows Bluetooth API
(1/1)
madmox:
Hello everybody,
I'm a novice with code::blocks (and actually in developping on windows). I'm trying to use Windows Bluetooth API in order to use RFCOMM sockets on a PC. I need the appropriate functions and structures which are included in the file "ws2bth.h", which I downloaded with the Windows Server 2008 SDK (including .net framework 3.5). I'm on Windows XP SP2.
The problem I have now is to configure code::blocks! I want to use the MinGW32 compiler, but I don't really know what I need to change in the build options. I tried many things such as adding the paths ("C:\Program Files\Microsoft SDK's\...\includes\" and "C:\...\lib\") in the linker settings and/or in the search directories, I also tried copying the appropriate headers (ws2bth.h, something like bthdef.h, etc.) in the include directory of MinGW32, but it doesn't seem to work: each time I have errors in the compilation (either the header files are not found, or there are errors in them...).
Well, I just think I'm doing everything wrong, so maybe you could give me some help...
dmoore:
madmox: you need to be much more specific about your project setup before anyone can help you. should should also turn on full compiler logging in global compiler settings/other settings and report the error messages. are you able to get a basic helloworld app to compile and run?
Biplab:
--- Quote from: madmox on September 06, 2008, 02:53:09 pm ---The problem I have now is to configure code::blocks! I want to use the MinGW32 compiler, but I don't really know what I need to change in the build options. I tried many things such as adding the paths ("C:\Program Files\Microsoft SDK's\...\includes\" and "C:\...\lib\") in the linker settings and/or in the search directories, I also tried copying the appropriate headers (ws2bth.h, something like bthdef.h, etc.) in the include directory of MinGW32, but it doesn't seem to work: each time I have errors in the compilation (either the header files are not found, or there are errors in them...).
--- End quote ---
You can't use VC compiled libs with MinGW.
madmox:
Then, how do I use the Bluetooth stack on windows with MinGW32? I already saw .lib files used with MinGW, that's why I tried this way. But what can I do except using Visual Studio compiler??
About my project setup... I have no access to my project right now (not at home ^^) but as far as I remember, it's a default Win32 empty project, with MinGW compiler, and no other option has been modified. I need to access to ws2bth.h in one file (here are examples of structs and functions needed):
http://msdn.microsoft.com/en-us/library/aa450944.aspx
http://msdn.microsoft.com/en-us/library/aa450300.aspx
Actually I need to run the application on an embedded plateform running on Windows CE 5.0, but I need to test it on the PC before. And my application starts and runs as long as I don't use bluetooth sockets functionnalities (and don't include ws2bth.h).
MortenMacFly:
--- Quote from: Biplab on September 06, 2008, 04:39:07 pm ---You can't use VC compiled libs with MinGW.
--- End quote ---
That's not entirely correct. Actually MinGW works just fine with most VC compiled libs (I do this every day). But there are exceptions, indeed.
Navigation
[0] Message Index
Go to full version