Running lex program

Asked by Rohan

I have written code for lex named nlp.l. Then i compiled it using command
$ lex nlp.l
its compiling it properly.
Then i linked the program using command
$ cc lex.yy.c -o first -ll
its also linking it properly.
Now i want to run it. I tried command
$ ./a.out
but it says
bash: ./a.out: No such file or directory
Help!! Packages like flex and gcc are installed properly.

Question information

English Edit question
Ubuntu flex Edit question
No assignee Edit question
Solved by:
David Hoeffer
Last query:
Last reply:
Revision history for this message
Best David Hoeffer (d-hoeffer) said :

a.out is the default name of the program produced by the compiler. You used the parameter "-o first", and therefore your program will be called "first". Try running it with

Revision history for this message
Rohan (ronbenkar) said :

Thanks David Hoeffer, that solved my question.

Revision history for this message
Rohan (ronbenkar) said :

Hey thanks David. Thanks a lot. It worked. Such a silly mistake.