I follow the steps below:
Compiler Name version: gcc (Ubuntu 4.3.5-3ubuntu1) 4.3.5
(a) Build C shared library libToySatSDR.so from ToySatDR.m.
(b) Run
mbuild ToySDRDriver.c -L. -lToySDR -I.
which executes fine.
(c) On Linux, running the program results in segmentation fault while returning from MATLAB function.
It appears there is nothing wrong with the code, as the same code compiled with Microsoft Visual Studio runs fine on Windows.
Best Answer