Fatal Error[Pe1696]: cannot open source file "ELECTROMAGNETIC.H" solution

The reason for the error is that the compiler cannot find the specified header file.
First determine whether this header file really exists.
If it exists, you can take these two solutions:
1. Write the complete path name when you include. Such as:
#include “D:\headers\msp430x14x.h”
2. Add your custom header file storage path to the default header file path of the compiler. Generally it is a function of the IDE you are using. It depends on what IDE you are using. Take iar as an example.
Find C/C++ Compiler -----Preprocessor in the Option of the project,
in the red box in the figure below Fill in the path of the H file, but pay attention to:
$ PROJ_DIR$\ is the directory of the workspace you are currently working in.
$PROJ_DIR $\ …\inc indicates the INC directory above your WORKSPACE directoryInsert picture description here

Guess you like

Origin blog.csdn.net/NikoHsu/article/details/107477310