在windows上制作flex.exe
我已经从 Flex 存储库下载了 Flex 的源代码。该文件是 tar.gz 中的 Flex 版本 2.5.35。现在我怎样才能从这个源代码中生成flex.exe呢?
I have downloaded the source code for flex from the Flex repository. The file is flex version 2.5.35 in tar.gz. Now how can I make flex.exe from this source code?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
只需下载二进制包即可,它们可以在这里找到: http://gnuwin32.sourceforge.net/packages /flex.htm 或者,您需要使用源附带的 makefile 来编译它(通过作为参数传递给 gcc 的
make.exe
)。Just download the binary packages instead, they are available here: http://gnuwin32.sourceforge.net/packages/flex.htm alternatively you need to use the makefile the source comes with to compile it (by passing as a parameter to gcc's
make.exe
).您有两种选择:
前者听起来对您来说是正确的答案,除非您需要最新版本的功能并且您的平台上有可用的 GNU 工具链。我不知道
flex
是否可以使用 MS 编译器进行编译而不会遇到很多麻烦。You have two options:
The former sounds like the right answer for you unless you need a feature of the latest version and have the GNU toolchain available on your platform. I don't know if
flex
will compile with the MS compiler without lots of pain.如果您确实想在 Windows 计算机上自己从源代码构建它(可能会也可能不会),您将需要安装 Cygwin。
If you really want to build it from source by yourself on a Windows machine (which may or may not work), you will want to install Cygwin first.
您可以尝试以下操作:http://sourceforge.net/projects/winflexbison/
这是移植到 Windows 的最新 Flex-bison 工具,无需额外的依赖项(如 m4.exe 或 Cygwin dll)
You can try this: http://sourceforge.net/projects/winflexbison/
This is latest flex-bison tools ported to windows without extra dependencies (like m4.exe or Cygwin dlls)