You are here: Start Linux and Computers Compile OSC for MATLAB
Compile OSC for MATLAB PDF Print E-mail
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
  • Install GCC 4.1
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
mex -setup
  • 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
osc_make()
  • to compile OSC for MATLAB
Attachments:
Download this file (osc_gcc.patch)osc_gcc.patch[Patch for OSC to allow compilation using GCC under Linux]5 Kb
Comments (0)
Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):S
:!::?::idea::arrow:
Security
Please input the anti-spam code that you can read in the image.
Last Updated on Friday, 24 April 2009 10:42
 
Template is Powered by www.schaffenskraft.info © 2008 | CSS 2.1 | XHTML 1.0