0

I am trying to compile a c program in terminal.

This is my command:

gcc -1 string -o syncing.c -o syncing

This is my result:

clang: error: no input files

I know that -1... indicates the library I used, syncing.c is the c file I am trying to compile

What am I doing wrong with my command or is it something else?

I am only using standard libraries.

Aswin Murugesh
  • 10,230
  • 10
  • 37
  • 68
GhostMember
  • 91
  • 1
  • 2
  • 9

1 Answers1

3

Please read this intro to GCC. You are telling it that syncing.c is your output file. But you want it to be your input file.

Also, I am not so sure on the -1 there. You might want to have a look at this on how to include/link external libraries.

Community
  • 1
  • 1
Domi
  • 18,735
  • 12
  • 77
  • 106