c++ bluetooth nxc comunication library

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
psorek
Posts: 13
Joined: 12 Feb 2012, 07:50

c++ bluetooth nxc comunication library

Post by psorek »

I have to send some simple informations (probably strings) from computer (program in C++) to NXT.
http://www.norgesgade14.dk/bluetoothlibrary.php
doesn't work, (compilation problems) and i haven't found another. May i please a link, best with simple tutorial in?
mcsummation
Posts: 220
Joined: 23 Jan 2012, 17:07
Location: Round Rock, TX

Re: c++ bluetooth nxc comunication library

Post by mcsummation »

I have used that library for a number of projects. What compiler are you using and what errors do you get?
psorek
Posts: 13
Joined: 12 Feb 2012, 07:50

Re: c++ bluetooth nxc comunication library

Post by psorek »

CodeBlocks with g++ for windows. Error:


C:\Users\psorek\Desktop\NXT Ploter\GRRRR\sound.h|35|error: extra qualification 'Sound::' on member 'Sound'|
C:\Users\psorek\Desktop\NXT Ploter\GRRRR\sound.h|40|error: extra qualification 'Sound::' on member 'Sound'|
C:\Users\psorek\Desktop\NXT Ploter\GRRRR\sound.h|47|error: extra qualification 'Sound::' on member 'print'|
C:\Users\psorek\Desktop\NXT Ploter\GRRRR\rcx_light.h|17|error: extra qualification 'Light_rcx::' on member 'Light_rcx'|
C:\Users\psorek\Desktop\NXT Ploter\GRRRR\rcx_light.h|21|error: extra qualification 'Light_rcx::' on member 'Light_rcx'|
||=== Build finished: 5 errors, 0 warnings ===|

Code copied from project's site.
mcsummation
Posts: 220
Joined: 23 Jan 2012, 17:07
Location: Round Rock, TX

Re: c++ bluetooth nxc comunication library

Post by mcsummation »

I don't see the error in the version of sound.h that I have.

Are you trying to use the two header files that cause the errors? If not, don't include them in the project.
psorek
Posts: 13
Joined: 12 Feb 2012, 07:50

Re: c++ bluetooth nxc comunication library

Post by psorek »

what version of gcc do you use and what compile flags?
psorek
Posts: 13
Joined: 12 Feb 2012, 07:50

Re: c++ bluetooth nxc comunication library

Post by psorek »

problem is when:

Code: Select all

class xyz
{
    xyz::methode (..);
}
which is used in all of the library. Do i have strange version of compiler, or it is uncompatible with c++ standard?
bullestock
Posts: 27
Joined: 29 Sep 2010, 19:34
Location: Denmark
Contact:

Re: c++ bluetooth nxc comunication library

Post by bullestock »

psorek wrote:problem is when:

Code: Select all

class xyz
{
    xyz::methode (..);
}
which is used in all of the library. Do i have strange version of compiler, or it is uncompatible with c++ standard?
gcc is correct here. Putting the xyz:: prefix in the class declaration is not valid C++. It is however allowed by Visual C++, which is what the author of the library uses.

So just remove them all.
psorek
Posts: 13
Joined: 12 Feb 2012, 07:50

Re: c++ bluetooth nxc comunication library

Post by psorek »

It is not nice. How can i install ONLY Visual C++ compiler? w/o IDE?
psorek
Posts: 13
Joined: 12 Feb 2012, 07:50

Re: c++ bluetooth nxc comunication library

Post by psorek »

Yeah, it works now. Someone should improve it.
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests