"Arduino: fatal error: WProgram.h: No such file or directory"의 두 판 사이의 차이
도구의인간 메이커스 위키
39번째 줄: | 39번째 줄: | ||
https://cl.ly/2I211w0W1n3b/Image%202017-05-30%20at%201.07.29%20AM.png | https://cl.ly/2I211w0W1n3b/Image%202017-05-30%20at%201.07.29%20AM.png | ||
− | [[category:Arduino | + | [[category:Arduino Tip]] |
2018년 6월 12일 (화) 11:05 기준 최신판
증상
컴파일시 WProgrma.h 파일 없음 메시지
error message:
/arduino/FWXYIQ4G1BBD44S/FWXYIQ4G1BBD44S.ino:3:22: fatal error: WProgram.h: No such file or directory #include "WProgram.h" ^ compilation terminated. exit status 1 Error compiling for board Arduino/Genuino Uno. This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
원인
옛 아두이노 0.0. xx 버전에서의 WProgram.h는 최근의 아두이노 1.0.xx 이상 버전에서에서 Arduino.h 로 변경됨.
해결책
소스 코드중
#include "WProgram.h"
를
#if defined(ARDUINO) && (ARDUINO >= 100)
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
로 수정한다.