This repository has been archived by the owner on Jun 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
tutorial headers
Tianshu Huang edited this page Oct 3, 2018
·
3 revisions
C code comes in two types of files: .c
files, and .h
files. The .h
files are called header files.
NOTE: .c
and .h
files are more or less functionally equivalent. However, most tools will assume that .h
files are header files, and most people will too. Don't be an asshole. Prototypes in .h
, and code in .c
.
Include header files using the #include
macro. This gives you access to anything defined by that header.
#include <stdio.h>
// Gives you access to standard IO library functions
// such as printf, scanf
#include <stdbool.h>
// Gives you access to "true" and "false"
#include <stdint.h>
// Defines uint8_t, uint16_t, ... and int8_t, int16_t,...
In order to use functions implemented in RASLib, you will need to #include
them. Since RASLib is not a default system library, you'll have to include them relative to the root directory of your project (which is already configured in the makefile).
Documentation for the RASLib headers can be found here.
#include <RASLib/inc/common.h>
// etc. Include headers as needed.