Reputation: 3820
I am trying to make an object file via "cc -c -o " but I get the following statement ,what should I do to solve this,thanks in advance
~/hedor1>lex -t example.l > example.c
~/hedor1>cc -c -o example.o example.l
cc: example.l: linker input file unused because linking not done
the first line to produce the example.c is working and I get the .c file but when I write the second line I get the above!
Upvotes: 0
Views: 202
Reputation: 15758
You are passing the flex source to the compiler, which apparently interprets it as being a linker input file, and complains because you told the compiler not to do the linking step.
The second command should have been:
cc -c -o example.o example.c
Upvotes: 1