The IDE makes using the compiler easy. However, one must still keep in mind that the IDE and the compiler are two separate programs. In particular, C/C++ rules regarding files still apply:
● While you may add any files to the IDE’s project file list, adding a header file to the IDE’s project file list is for documentary purposes only. Per C/C++ rules, you must still explicitly add:
to your source file(s), if you want that particular source file(s) to include the contents of myheader.h
compiler only processes one source file at a time. It cannot “see”
other declarations or object definitions in another file. This is
standard C/C++ behavior.
● Standard C/C++ Library header files (e.g. stdio.h, string.h etc.) only declare the prototypes of the library functions. The code for a library function is not included in your executable image unless the program actually calls the function.