Hello everybody.

I wrote some Csound Plugins to use on the Bela Board.
The Csound API is using the float type 'MYFLT', which checks if the system is running floats or doubles.
This normaly works on my desktop machine.
But bela board refuses to load the plugins with this error message:
WARNING: [mnot loading 'genious.so' (uses incompatible floating point type)

So i guess my compiling is not working right. I uses this compile command:
gcc -shared -o ../releases/genious.so genious.c -I../../../Csound.headerfiles
and i also used this one
gcc -O2 -shared -o ../releases/xine.so -fPIC xine.c -DUSE_DOUBLE -I./Headers/

Can someone help?

All the best,
Philipp

I think the csound that's built on the board uses FLOAT, can you try -DUSE_FLOAT ?

i used gcc -O2 -shared -o ../releases/xine.so -fPIC xine.c -DUSE_FLOAT -I./Headers and it still does not work.

Can you provide the source code of the plugin and a demo csd file?

Of course!

In src there is xine.c which needs to be compiled.

src.zip
11kB

On the bela board you need to put the compiled plugin in:
/usr/lib/csound/plugins-6.0/

This is a example .csd

thomash.txt
741B

But don't forget that you need the right headerfiles:

headers.zip
100kB

    include/helper_functions.h and include/xine.h (at least) are missing from your source files. Can you include the make/cmake file as well?

    PvN But don't forget that you need the right headerfiles:

    Shouldn't you build against /usr/include/csound?

      giuliomoro Shouldn't you build against /usr/include/csound?

      I guess so. This would explain it:

      Running:

      diff -r ../Headers/ /usr/include/csound/

      gives:

      [...]
      diff -r ../Headers/float-version.h /usr/include/csound/float-version.h
      32c32
      < #define USE_DOUBLE
      ---
      > /* #undef USE_DOUBLE */

      giuliomoro Sorry, ìnclude dir was missing.

      include.zip
      1kB

      xine.c needs these headerfiles, which are made by me.
      The project is like:

      -- Project
        \-- src
          \-- xine.c
        \-- include

      You need to include the header files i previously uploaded for the compile command. These are the standard Csound 6 headerfiles.

      There's no "standard Csound 6 headerfiles", as it seems: they depend on the actual build of csound in use, so you should always build agains the ones that are provided with your csound distribution, not some "standard" ones you may have found elsewhere. As outlined above, the ones on the board differ from the ones you are building against because the ones on the board don't have USE_DOUBLE defined.

      Case in point:

      gcc -O2 -I /usr/include/csound -fPIC xine.c -shared -o xine.so

      works.

      Thanks a lot!
      This works perfectly!

      I did not found the headferiles on the bela board, so i copied these i'm working with from my machine to the bela board.
      And since Csound is already on Version 7 and the community does not support development on csound 6 i kept these files for this.

      Thank you!