Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/268.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/powerbi/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
windows上的c#makefile_C#_Makefile - Fatal编程技术网

windows上的c#makefile

windows上的c#makefile,c#,makefile,C#,Makefile,要在windows 7上运行以下makefile,我需要安装/配置什么: MONO = mono MONOC = gmcs MONOCFLAGS = -optimize -reference:${PARSERREF} GPLEX = ${MONO} gplex.exe GPPG = ${MONO} gppg.exe PARSERREF = bin/ShiftReduceParser.dll CSFILES = Absyn.cs Parser.cs Printer.cs Scanner.cs Te

要在windows 7上运行以下makefile,我需要安装/配置什么:

MONO = mono
MONOC = gmcs
MONOCFLAGS = -optimize -reference:${PARSERREF}
GPLEX = ${MONO} gplex.exe
GPPG = ${MONO} gppg.exe
PARSERREF = bin/ShiftReduceParser.dll
CSFILES = Absyn.cs Parser.cs Printer.cs Scanner.cs Test.cs VisitSkeleton.cs AbstractVisitSkeleton.cs
all: test

clean:
rm -f test.pdf test

distclean: clean
rm -f ${CSFILES}
rm -f test.l test.y test.tex
rm -f Makefile

test: Parser.cs Scanner.cs
@echo "Compiling test..."
${MONOC} ${MONOCFLAGS} -out:bin/test.exe ${CSFILES}

Scanner.cs: test.l
${GPLEX} /out:$@ test.l

Parser.cs: test.y
${GPPG} /gplex test.y > $@
我一直使用VisualStudio,但是,这一次,它是由BNFC(解析器生成器)生成的。我在这个makefile中没有看到csc.exe(CSharp编译器)。有人能给我解释一下吗


注意:我的计算机上安装了gplex.exe和gppg.exe以及.NET。

您需要下载并安装GNU make for Windows

然后打开cmd.exe和cd到makefile所在的目录

然后键入make并按enter键,或者在本例中为
make test

此make文件适用于Mono(它解释了Mono在名称中的所有用法,如
$(Mono)
$(MONOCFLAGS)
)。所以编译器不是csc.exe,您需要安装Mono或将其更改为使用VS。@KenWhite谢谢,所以我将在Windows上安装Mono,这样应该可以正常工作?我已经安装了Mono,现在我有了这个Makefile。如何执行makefile?在mac中,我只能说make@2D3D4D:这是一个makefile,您需要安装GNU make。