Windows找不到win_bison.exe

时间:2022-06-07 00:41:22

I'm trying to get to work with flex and bison in Visual Studio 2013, but I have a problem.
I've downloaded win_flex_bison from here, followed this tutorial and added "C:\GnuWin32\win_flex_bison;" to environmental variables, but when I'm trying to build the project I'm getting error that Windows cannot find win_bison.exe

我想在Visual Studio 2013中使用flex和bison,但我遇到了问题。我从这里下载了win_flex_bison,按照本教程添加“C:\ GnuWin32 \ win_flex_bison;”环境变量,但是当我尝试构建项目时,我收到的错误是Windows无法找到win_bison.exe

"Error  1   error MSB3721: The command "start /B /WAIT /D "D:\\...\" 
 win_bison.exe --output="sample.tab.cpp" --defines="sample.tab.h" "sample.y"
  " exited with code 1.
C:\GnuWin32\win_flex_bison\custom_build_rules\win_flex_bison_custom_build.targets   55 5 kompilator

In the console win_bison and win_flex works fine. What I have to do?

在控制台win_bison和win_flex工作正常。我该怎么办?

1 个解决方案

#1


1  

Something wrong with the /D parameter of the command:

命令的/ D参数有问题:

/D "D:\\...\"

It's expanded from

它从中扩展而来

/D "%(RootDir)%(Directory)"

You should check %(RootDir) and %(Directory) macro-variables in your project

您应该检查项目中的%(RootDir)和%(目录)宏变量

#1


1  

Something wrong with the /D parameter of the command:

命令的/ D参数有问题:

/D "D:\\...\"

It's expanded from

它从中扩展而来

/D "%(RootDir)%(Directory)"

You should check %(RootDir) and %(Directory) macro-variables in your project

您应该检查项目中的%(RootDir)和%(目录)宏变量