help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave/C++


From: Mike Morley
Subject: Re: Octave/C++
Date: 22 Jul 2005 14:56:18 +0100

On Jul 22 2005, Søren Hauberg wrote:

Mike Morley wrote:
[snip]
> The robot_link command is in the file "librobot.a" which is in the > working directory. I've tried the "-l" and "-L" options for mkoctfile > but can't succesfully any link the librobot.a file in. Any suggestions?
What was the (compile time) output when you tried these flags?
I assume you did something like this

mkoctfile Bot.cpp -o BotMake.oct -lrobot

right? Was librobot.a in your LD_PATH?

/Søren

$mkoctfile Bot.cpp -llibrobot.a
/usr/bin/ld: cannot find -llibrobot.a
collect2: ld returned 1 exit status
$

$mkoctfile Bot.cpp -Llibrobot.a $ln -s Bot.oct BotMake.oct $octave -q 1>BotMake() octave: symbol lookup error: /home/mjm80/BotMake.oct: undefined symbol: _ZN10robot_linkC1Ev $


> On Jul 22 2005, Søren Hauberg wrote:
> >> Hi,
>> I haven't looked at the code you provided a link to, but here goes...
>> From what I understand C++ robot interface basicly consist of a >> "robot_link" object that you have to provide each to you want the >> robot to act. I'd say the easiest thing to do is to create a new >> octave type in C++ that contains a "robot_link" and then write wrapper >> functions to the functions your students need to access. >> A tutorial on how to write new types for Octave can be found at >> http://wiki.octave.org/wiki.pl?CodaTypes
>>
>> Hope this helps, if not write again. Your problem should be fairly >> easy to solve, although it will require a bit of work.
>>
>> /Søren
>>
>> Mike Morley wrote:
>> > Hi,
>> > > I see there's been some chatter about this recently, but I have >> another > question for the Octave/C++ gurus. >> > > I'm currently working on a project that involves robotics in a > >> University teaching environment. >> > > Students currently control the robot using a C++ program they >> write > themselves and a set of commands for which they have the >> header files. >> > > (I've put the header files and an example program that tests the >> link > online at http://www.srcf.ucam.org/~mjm80/robot/) >> > > What we would ideally like is a higher level way of controlling >> the > robot - ie, from Octave. Partly this would enable signal >> processing to > become much easier and thus easily extend the range of >> tasks we can > expect students to get their robots to perform. >> > > As I understand it, I need to create the C++ wrappers for each of >> the > functions and then compile this into a .oct file in order to run >> it. >> > > However: I'm not entirely sure how to do this - is it, for >> example, > possible to have a robot_link object that persists for the >> entire > Octave program? Would I be able to create a function that >> mimics > rlink.command (COMMAND_NAME, var) that takes COMMAND_NAME and >> var in as > arguments, or would I have to create a function for each >> specific > command?
>> > > Any help/pointers would be greatly appreciated.
>> > > - Mike Morley
>> > > > > -------------------------------------------------------------
>> > Octave is freely available under the terms of the GNU GPL.
>> > > Octave's home on the web:  http://www.octave.org
>> > How to fund new projects:  http://www.octave.org/funding.html
>> > Subscription information:  http://www.octave.org/archive.html
>> > -------------------------------------------------------------
>> >
>>
>>
>> -------------------------------------------------------------
>> Octave is freely available under the terms of the GNU GPL.
>>
>> Octave's home on the web:  http://www.octave.org
>> How to fund new projects:  http://www.octave.org/funding.html
>> Subscription information:  http://www.octave.org/archive.html
>> -------------------------------------------------------------
>>
>>
>


--
Mike Morley - Trinity College Part IB Natural Sciences

E1 Burrell's Field | address@hidden | 07862 282608

   First & Third Trinity Boat Club May Ball 2005
address@hidden || address@hidden

   Cambridge Union Society -- External Committee






-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]