필터 지우기
필터 지우기

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

조회 수: 4 (최근 30일)
Tom Busby
Tom Busby 2018년 8월 22일
답변: Tristan Yang 2018년 8월 24일
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
dpb
dpb 2018년 8월 22일
When set up mex the include directory is defined; need to put the file wherever that is on your system.

댓글을 달려면 로그인하십시오.

답변 (1개)

Tristan Yang
Tristan Yang 2018년 8월 24일
You may specify the header file path with MEX using the -I option. See this post:

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by