Raspberry Pi 3B install gcc and g ++

Turn: https: //blog.csdn.net/zhuming3834/article/details/81946707

installation

If it is not root a user, add your own sudo 
apt-get install gcc g++ 
and do: gcc -vthe following results occur: 

Gcc represents a successful installation

Test
(1) new file hello.c Touch
(2) Insert the following code:

#include <stdio.h>
int main (int argc, char * the argv [])
{
the printf ( "the Hello World \ n-!");
return 0;
}

compiler
gcc hello hello.c -o meant here is the above hello hello.c file is compiled files

Run:
./hello
can see the terminal output: Hello World!


Delete
apt-get remove gcc version if installed wrong or do not want it can be deleted.

Guess you like

Origin www.cnblogs.com/little-kwy/p/12286034.html