|
Written by Andreas Böhler
|
|
Tuesday, 10 March 2009 14:26 |
|
For one of our projects we needed an OSC implementation in MATLAB. Fortunately, there is a free version available from Andy Schmeder. However, it is only pre-compiled available for MacOS X and Windows, but not for Linux. This guide shows how you can compile mexosc on Ubuntu Linux.
- Download the source frome here: http://andy.schmeder.net
- Unzip the source to any folder
- Install liblo0-dev
sudo apt-get install liblo0-dev sudo apt-get install gcc-4.1 - Create a symbolic link to the Standard C++ library
sudo ln -s /usr/lib/libstdc++.so.6 /usr/lib/libstdc++.so - Edit /usr/include/lo/lo_endian.h and comment out lines 89 to 99 (just before the #endif)
- Start MATLAB and navigate to the folder where you extracted the source code
- Type
- and select "2" for the GCC compiler
- Edit ~/.matlab/R2008b/mexopts.sh and change line 57 to the following:
CC='gcc-4.1' CFLAGS='-ansi -std=c99 -D_GNU_SOURCE'
Patch the whole OSC tree to remove all comments using osc_gcc.patch (see attachment) not needed anymore if you add -std=c99 to CFLAGS (see above)- Type
- to compile OSC for MATLAB
Attachments:
osc_gcc.patch | [Patch for OSC to allow compilation using GCC under Linux] | 5 Kb |
|
|
Last Updated on Friday, 24 April 2009 10:42 |