Error running program in C "No such file or directory"

Asked

Viewed 200 times

0

I am trying to run a program in C, but an error occurs

I take the following steps:

gcc -c prog.c -o prog
/.prog

And it turns up:

bash: /.prog: No such file or directory
  • 4

    It is . /Prog , not /.Prog

  • 1

    You also need link with the standard library. The parameter -c stops the process of creating an executable before the linkage. The result is not executable. Calls compiler without the -c: gcc -Wall prog.c -o prog.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.