次のようなファイル構造があります。
interface.h --> interface.c
|
|
effects.h --> effects.c
|
|
main
ただし、effects.h で宣言された関数は、main ではアクセスできません。
コード スニペット:
主要 :
#include "interface.h"
#include "effects.h"
void setup() //Initialize all variables here
{
....
turnoff();
};
Effects.h :
#ifndef EFFECTS
#define EFFECTS
void turnoff();
#endif
Effects.c :
#include "interface.h"
#include "effects.h"
void turnoff()
{
....
};
interface.h :
#ifndef INTERFACE
#define INTERFACE
....
#endif
エラーメッセージ :In function ``loop':undefined reference to ``turnoff()'
ループ関数が空であるため、エラーメッセージは意味がありません!