I have downloaded clang. When I got onto terminal and type clang it results in the error no input files.
Asked
Active
Viewed 5,024 times
-5
Eliah Kagan
- 117,780
1 Answers
2
The clang: error: no input files error in your question means exactly what it says. You need to specify an input file after typing clang in the terminal in order to tell clang what code to run.
This example uses the clang package from the default Ubuntu repositories (clang-3.8) and the following source code for hello.c.
#include <stdio.h>
int main(int argc, char **argv) {
printf("hello world\n");
}
Change directories using cd to the directory containing hello.c (the input file) and compile it using the following command:
clang hello.c
The compiled executable file will be named a.out. Run it using the following command:
./a.out
The results of ./a.out are:
hello world
karel
- 114,770
clang your_file.c– Carl H Jul 03 '17 at 07:12clangsays, you have not given it any input files.) What are you trying to do? – Eliah Kagan Jul 04 '17 at 06:18