MATLAB: Invalid ELF Header

elf header

I'm trying to run a simulation that contains an S-function (originally created in C) and I keep getting the error "Invalid MEX file……Invalid ELF header". Can anyone tell me what I might be doing wrong? I had no issues when I was running this in Windows and I'm not sure why Linux keeps returning this error. I don't know much about ELF headers and I would really appreciate it if someone could explain to me what I am doing wrong here.

Best Answer

The S function needs to be recompiled for Linux .
Related Question