Effacer les filtres
Effacer les filtres

How do you include Arduino.h when using mex to compile C code?

4 vues (au cours des 30 derniers jours)
Tom Busby
Tom Busby le 22 Août 2018
I'm trying to follow the tutorial above but when I attempt to use mex I get the error below.
Error using mex
/home/USERNAME/Documents/Source/digitalio_arduino.cpp:1:21: fatal error: Arduino.h: No
such file or directory
compilation terminated.
What do I have to do to get Arduino.h to mex?
I'm using Ubuntu 16.04.
  1 commentaire
dpb
dpb le 22 Août 2018
When set up mex the include directory is defined; need to put the file wherever that is on your system.

Connectez-vous pour commenter.

Réponses (1)

Tristan Yang
Tristan Yang le 24 Août 2018
You may specify the header file path with MEX using the -I option. See this post:

Catégories

En savoir plus sur MATLAB Compiler dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by