From Wiki for iCub and Friends
Jump to: navigation, search

Note: in order to have the C# bindings to work under linux you need yarp to be compiled in shared mode.

The current supported method for using YARP from C# is via SWIG. See:


README in that directory contains information.

In theory you can just do:

 cd $YARP_ROOT/bindings
 mkdir buildCS
 cd buildCS
 ccmake ..

You should end with a dynamic library (yarp.dll in windows, libyarp.so in linux) move that somewhere in your path (windows) or $LD_LIBRARY_PATH (linux).

You should also have a bunch of .cs files in the /generated_src directory, they will serve to generate the .NET dll.

Create a directory /YarpCS Open Visual Studio / monodevelop and start a new Classes Library project named YarpCS in /YarpCS.

From this project, remove the "Class1.cs" generated by visual studio and add all the .cs file generated by swig earlier.

Generate the solution.

It will product a file called YarpCS.dll, this is the dll that your CS project will reference.

Try to create a new project, click on add reference and add YarpCS.dll ; intellisense should give you access to Yarp.