Closed chtenb closed 7 years ago
I'm not the Windows build expert, but is there a problem with write permissions?
flex -o scan.c scan.l :VCEnd flex: can't open scan.c
Where is this scan.c
file supposed to live?
Googling around tells me that there should probably be a scan.c file in lib/cgraph/, but in my clone there isn't. There's just a scan.l file. Is that correct or is something going wrong there?
Flex will generate this file as a pre build event, with scan.l as input. The message stating that flex can't open scan.c probably means that flex can't create this file. So the problem can be like @ellson suggested: flex doesn't have permission to write to this directory. Can you verify this?
The other Visual Studio solutions are outdated, the one in the root of the project is indeed the correct one.
I bumped the permissions of flex.exe to the max, and run git bash as administrator, but I still get the same error, even in a different folder, like my Desktop:
Chiel.tenBrinke@IM-Chiel-2015 MINGW64 ~/Projects/graphviz/lib/cgraph (master)
$ flex --version
C:\Program Files (x86)\GnuWin32\bin\flex.exe version 2.5.4
Chiel.tenBrinke@IM-Chiel-2015 MINGW64 ~/Projects/graphviz/lib/cgraph (master)
$ cp scan.l ~/Desktop/
Chiel.tenBrinke@IM-Chiel-2015 MINGW64 ~/Projects/graphviz/lib/cgraph (master)
$ flex -o ~/Desktop/scan.c ~/Desktop/scan.l
C:\Program Files (x86)\GnuWin32\bin\flex.exe: can't open C:/Users/Chiel.tenBrinke/Desktop/scan.c
All right, I think I found the culprit. The space between -o
and its argument doesn't seem to be allowed. Removing it makes the cgraph project build.
flex -oscan.c scan.l
The other Visual Studio solutions are outdated, the one in the root of the project is indeed the correct one.
Shouldn't those be removed then? And what about those *.cs
files in windows/
?
I'm trying to build graphviz on windows, but I'm currently stuck with the following error. I installed bison and flex from gnu win 32 page on sourceforge (http://gnuwin32.sourceforge.net/), they're now available from the PATH.
When building the cgraph project from the graphviz.sln with Visual Studio 2015 or when using msbuild from gitbash, I get the error pasted below. Any idea what's going on?
Btw, I saw there is another graphviz.sln in the windows folder, but it seems out of date. Is that correct? Or is that the solution I should use? It's a bit confusing.