Summary:
1>Executing Lex for d:\usr\doxygen\src\code.cpp ...
1>flex: can't open ..\src\code.l
1>Project : error PRJ0019: A tool returned an error code from "Executing Lex for d:\usr\doxygen\src\code.cpp ..."
Details
I am compiling occasionally the sources of Doxygen (http://www.doxygen.org/) to publish its Windows binaries from SVN versions. The Visual Studio C++ 2008 (i.e. version 9) is used for the purpose. As Doxygen sources use also yacc and lex tools, the cygwin bison and flex was used succesfully in the past. It stopped to work. Namely, the flex complains it cannot find its source (as shown in the summary above). The version of flex on my computer is:
d:\>flex --version
flex 2.5.35
The VS project winbuild\Doxygen.vcproj
is configured to launch flex, and the Visual Studio apparently generates a batch file for the purpose. The Build Log contains the following:
Creating temporary file "d:\usr\doxygen\winbuild\Debug\BAT00000241406084.bat" with contents
[
@echo off
flex -PcodeYY -od:\usr\doxygen\src\code.cpp ..\src\code.l
if errorlevel 1 goto VCReportError
goto VCEnd
:VCReportError
echo Project : error PRJ0019: A tool returned an error code from "Executing Lex for d:\usr\doxygen\src\code.cpp ..."
exit 1
:VCEnd
]
Creating command line "d:\usr\doxygen\winbuild\Debug\BAT00000241406084.bat"
When trying the command manually from command line, I can really observe the same:
d:\usr\doxygen\src>flex -PcodeYY -od:\usr\doxygen\src\code.cpp ..\src\code.l
flex: can't open ..\src\code.l
However, when replacing backslashes at the path to the code.l
by normal slashes, it works:
d:\usr\doxygen\src>flex -PcodeYY -od:\usr\doxygen\src\code.cpp ../src/code.l
I am not sure if the problem with backslash vs. slash in the flex version is the newly introduced bug/feature or not. Is there a way to fix that?