c - 执行 lex 的窗口无法识别 ./a.out

标签 c windows lex dev-c++

我在 Windows 10 上使用 DevCpp 和 Flex。为了执行我的 lex 程序,我尝试使用 ./a.out 但出现以下错误。

C:\Users\Admin\Desktop>flex id1.l
C:\Users\Admin\Desktop>gcc lex.yy.c
C:\Users\Admin\Desktop>./a.out
'.' is not recognized as an internal or external command,

可运行的程序或批处理文件。

这里可能有什么问题,请帮我解决这个问题。

最佳答案

它创建一个文件名a.exe

C:\Users\Admin\Desktop>flex id1.l

C:\Users\Admin\Desktop>gcc lex.yy.c

C:\Users\Admin\Desktop>a

asd ase 12 4rf
  12 4

这就是我们在 Windows 中执行 lex 的方式

关于c - 执行 lex 的窗口无法识别 ./a.out,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48476636/

相关文章:

c - 如何传递和接收指向结构数组的指针?

windows - 为什么 slim reader/writer 独占锁的性能优于共享锁?

用C计算文件中的单词

c - 如何指示 ld 使用 c 查找其他目录?

c - 未解析的外部符号 _sleep 使用 sleep()?

c# - Windows 应用商店 CurrentApp.LoadListingInformationAsync() - 错误 0x801900cc

c++ - 在 Visual Studio 中使用 lex 和 yacc 输出时出现链接错误

linux - 无法识别的规则 lex 中的错误

c - 由于简单错误,lex 文件未编译

c - 如何将文件硬编码为字节数组?