missing mex.h, trying to ompile mex/wave_travel_time.c

14 views
Skip to first unread message

Felipe Maza

unread,
Jul 8, 2021, 7:10:35 AM7/8/21
to mirone
Hi,

I'm trying to compile mex/wave_travel_time.c to use from python. I don't have much knowledge of C, so I may be doing something wrong.

I downloaded the code from https://github.com/joa-quim/mirone/ and I'm on Ubuntu 20.04.

$ cc -FPIC -shared -o wave_travel_time.so mex/wave_travel_time.c
mex/wave_travel_time.c:32:10: fatal error: mex.h: No such file or directory
   32 | #include "mex.h"
      |          ^~~~~~~
compilation terminated.


Can you guide me to achieve it?

Thanks,

Best regards,

Joaquim Manuel Freire Luís

unread,
Jul 8, 2021, 10:14:59 AM7/8/21
to mir...@googlegroups.com

Hi Felipe,

 

I’m afraid it’s not that simple and certainly requires C knowledge.

MEX files are C files that use Matlab libraries to communicate with the Matlab engine, namely for the input/output. The header you are missing is the one that declares those Matlab libraries.

Basically to use it in Python you would have to rip out the mexFunction() function and replace it with an equivalent Cyton function.

 

Sorry

 

Joaquim Luis

--
You received this message because you are subscribed to the Google Groups "mirone" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mirone+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mirone/db76839f-68ef-412a-9980-e712ae67f77en%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages