Embedded C programming Basics
- Compiler
dpkg --list | grep compiler
The GNU Compiler Collection (GCC) is a compiler system produced by the GNU Project supporting various programming languages. It comes inbuilt in most of the open source Operating Systems. Use following command to get information on installed GCC.
gcc -v
Open a terminal and execute the following command to install g++:
cd ~
mkdir cpro
cd cpro
mkdir cpro_test
cd cpro_test
Open a terminal and execute the following command to install g++:
nano main.c
Open a terminal and execute the following command to install g++:
#include<stdio.h>
int main()
{
printf("Hello World!\n");
return 0;
}
Compile :
gcc main.c
./a.out