AnsweredAssumed Answered

Can't compile Simulink model ad9361_sim.slx

Question asked by arndgeis on Nov 7, 2014
Latest reply on Nov 17, 2014 by dpu

Hi,

I'm having some trouble getting the Simulink model for the AD9361 reference design to work. The module in question is the ad9361_sim.slx model which is in the git repository under mathworks_tools/iio_sys_obj.

My environment is a 64-bit Linux system running Matlab R2014a.

The mex compiler is set up as 'gcc' for C-language & 'g++' for C++ language.

 

When I run the example from simulink the compilation fails with errors about:

- iio.h: error: unknown type name 'ssize_t'  (see below)

- libiio_thunk_glnxa64.c: error: expected declaration specifiers or '...' before string constant (see below)

 

Error snippets:

MATLAB System block 'ad9361_sim/MATLAB System' error occurred when invoking 'setupImpl' method of 'iio_sys_obj'. The error was thrown from '

>  '/usr/local/MATLAB/R2014a/toolbox/matlab/general/loadlibrary.m' at line 422

>  '<path>/mathworks_tools/iio_sys_obj/libiio_if.m' at line 360

>  '<path>/mathworks_tools/iio_sys_obj/iio_sys_obj.m' at line 165'.

 

Building libiio_thunk_glnxa64 failed. Compiler output is: /usr/bin/gcc -I"/usr/local/MATLAB/R2014a/extern/include" -fexceptions -fPIC -fno-omit-frame-pointer -pthread -I"<path>/mathworks_tools/iio_sys_obj" -I"<path>/mathworks_tools/iio_sys_obj" "libiio_thunk_glnxa64.c" -o "libiio_thunk_glnxa64.so" -Wl,-E -shared In file included from libiio_thunk_glnxa64.c:23:0: <path>/mathworks_tools/iio_sys_obj/iio.h:284:2: error: unknown type name ‘ssize_t’ __api ssize_t iio_device_attr_read(const struct iio_device *dev,


EXPORT_EXTERN_C (visibility("default")))structiio_context*iio_create_xml_context(char*xml_fileThunk(void fcn(),const char *callstack,int stacksize) ^ libiio_thunk_glnxa64.c:43:30: error: expected declaration specifiers or ‘...’ before string constant



Thanks for your help.

Arnd

Outcomes