Hello World in C Linux mint [closed]

2

I would like you to help me with an error that I have: I am starting to learn the C language and to do this I installed code blocks in linux Linux, apparently the gcc compiler was already installed, so I did not uninstall any other. The problem is that when I compile the classic hello wolrd I get the following error: g ++ no such file or directory

    
asked by Camilo Martinez 31.10.2016 в 15:58
source

3 answers

0

Yes, you have a hello.c, you have to compile it with the instruction:

gcc hello.c -o hello

and the gcc package installed.

    
answered by 31.10.2016 в 16:08
0
no such file or directory

There simply is not a file or directory with that name, the steps to do are:

cd /al/directorio/
gcc -o hello hello.c

What happens is that you are not located in the directory where the file is located.

    
answered by 31.10.2016 в 18:06
0

Ok, you have the gcc installed.

and the g ++? They are 2 different things.

apt-get --no-install-recommends install g++
    
answered by 02.12.2016 в 08:37