Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

RB-100 Lubuntu gcc/g++ use roboard libraries

Based on DMP's Vortex processor / SoC this board is a full computer capable of running a standard Windows and Linux installation on the backpack of your robot.
4 postsPage 1 of 1
4 postsPage 1 of 1

RB-100 Lubuntu gcc/g++ use roboard libraries

Post by krokido » Sat Mar 10, 2012 11:34 pm

Post by krokido
Sat Mar 10, 2012 11:34 pm

Hi

I have installed the Lubuntu image, as supplied by Roboard on their website, onto the roboard RB-100. works great!
I can make a simple 'hello world' program in C++ using G++ as compiler
But as soon as I want to use Roboard specific functionality, such as 'roboio_SetRBVer(RB_100)', I get the following error message from g++:
'undefined reference to 'roboio_SetRBVer' colelct2: ls returned 1 exit status'

I am having troubles with making/installing/placing the RoBoIO library... I don't know where to put what and how ... a general lack of knowledge on my part here ...

I have very little experience with Linux and g++ so ... 'newbyproof' answers are highly appreciated!

The code I made:

Code: Select all
#include <iostream>
#include <stdio>
#include <string>
#include <stdlib>
#include "roboard.h"

using namespace std;

int Add(int x, int y)
{   
   return(x+y);
}

int main()
{
   roboio_SetRBVer(RB_100);

   int a, b, c;

   cout << "Hello World!" << endl;
        cout << "give the two numbers to add;" <<endl>> a;
   cin >> b;
   c = Add(a, b);
   cout << "a + b = " << c << endl;
   return 0;
}
Hi

I have installed the Lubuntu image, as supplied by Roboard on their website, onto the roboard RB-100. works great!
I can make a simple 'hello world' program in C++ using G++ as compiler
But as soon as I want to use Roboard specific functionality, such as 'roboio_SetRBVer(RB_100)', I get the following error message from g++:
'undefined reference to 'roboio_SetRBVer' colelct2: ls returned 1 exit status'

I am having troubles with making/installing/placing the RoBoIO library... I don't know where to put what and how ... a general lack of knowledge on my part here ...

I have very little experience with Linux and g++ so ... 'newbyproof' answers are highly appreciated!

The code I made:

Code: Select all
#include <iostream>
#include <stdio>
#include <string>
#include <stdlib>
#include "roboard.h"

using namespace std;

int Add(int x, int y)
{   
   return(x+y);
}

int main()
{
   roboio_SetRBVer(RB_100);

   int a, b, c;

   cout << "Hello World!" << endl;
        cout << "give the two numbers to add;" <<endl>> a;
   cin >> b;
   c = Add(a, b);
   cout << "a + b = " << c << endl;
   return 0;
}
krokido
Newbie
Newbie
Posts: 3
Joined: Sat Mar 10, 2012 11:19 pm

Re: RB-100 Lubuntu gcc/g++ use roboard libraries

Post by roboard » Mon Mar 12, 2012 10:53 am

Post by roboard
Mon Mar 12, 2012 10:53 am

Hi,

please go to http://www.roboard.com/download_ml.htm and download "RoBoIO 1.81 binary for for Debian & Ubuntu".

Extract it and then you can find Linux makefile examples for RoBoIO in the "Examples" directory.

:)
Hi,

please go to http://www.roboard.com/download_ml.htm and download "RoBoIO 1.81 binary for for Debian & Ubuntu".

Extract it and then you can find Linux makefile examples for RoBoIO in the "Examples" directory.

:)
roboard
Savvy Roboteer
Savvy Roboteer
Posts: 302
Joined: Fri Jul 03, 2009 4:44 am

Post by krokido » Mon Mar 12, 2012 3:15 pm

Post by krokido
Mon Mar 12, 2012 3:15 pm

Great!

compiling now works! indeed the answer is in the make files

Code: Select all
pwm.exe : pwm.o
   gcc -o pwm.exe pwm.o -L../../Lib -lRBIO -lstdc++
pwm.o : pwm.cpp
   gcc -c pwm.cpp -I../../Include

.PHONY : clean
clean :
   -rm pwm.o pwm.exe


I didn't the -L and -I options resulting in the error. Now the code runs smoothly ... but, using

Code: Select all
sudo -i
./pwm.exe


Does not move my Robbe Futaba S3003 which is connected to either port S1 and or S2 ... I'll look at that again tonight :D

Thank you RoBoard!
Great!

compiling now works! indeed the answer is in the make files

Code: Select all
pwm.exe : pwm.o
   gcc -o pwm.exe pwm.o -L../../Lib -lRBIO -lstdc++
pwm.o : pwm.cpp
   gcc -c pwm.cpp -I../../Include

.PHONY : clean
clean :
   -rm pwm.o pwm.exe


I didn't the -L and -I options resulting in the error. Now the code runs smoothly ... but, using

Code: Select all
sudo -i
./pwm.exe


Does not move my Robbe Futaba S3003 which is connected to either port S1 and or S2 ... I'll look at that again tonight :D

Thank you RoBoard!
krokido
Newbie
Newbie
Posts: 3
Joined: Sat Mar 10, 2012 11:19 pm

Post by krokido » Mon Mar 12, 2012 6:18 pm

Post by krokido
Mon Mar 12, 2012 6:18 pm

And the Robbe Futaba s3003 servos also move!

DMP Roboard, awesome job! Great product and great support!

greetings from a happy newby!
And the Robbe Futaba s3003 servos also move!

DMP Roboard, awesome job! Great product and great support!

greetings from a happy newby!
krokido
Newbie
Newbie
Posts: 3
Joined: Sat Mar 10, 2012 11:19 pm


4 postsPage 1 of 1
4 postsPage 1 of 1