[英]Premake fails to create Makefile for C# library
I've just learned about Premake recently and decided to check it out. 我最近才了解Premake ,因此决定进行检查。
It seems to work fine with C++ projects, but for some reason, whenever it encounters a C# program, it flips out. 它似乎可以在C ++项目中正常工作,但是由于某种原因,每当遇到C#程序时,它都会翻转。
Take this example Premake script: 请看以下示例Premake脚本:
solution "ExampleLib"
configurations { "Debug", "Release" }
project "ExampleLib"
kind "SharedLib"
language "C#"
files { "../src/**.cs" }
configuration "Debug"
defines { "DEBUG" }
flags { "Symbols" }
configuration "Release"
defines { "NDEBUG" }
flags { "Optimize" }
When I generate the Makefile with premake4 --os=linux gmake
, I get this output: 当我使用
premake4 --os=linux gmake
生成Makefile时,得到以下输出:
Building configurations...
Running action 'gmake'...
Generating Makefile...
Generating ExampleLib.make...
[string "premake.dotnet = { }..."]:28: attempt to compare nil with string
If I try to the run the Makefile, I get this: 如果我尝试运行Makefile,则会得到以下信息:
==== Building ExampleLib (debug) ====
ExampleLib.make:12: *** missing 'endif'. Stop.
Makefile:16: recipe for target 'ExampleLib' failed
make: *** [ExampleLib] Error 2
Examining the Makefile, it seems that Premake abruptly quit during the "ifndef CSC" section. 检查Makefile,似乎Premake在“ ifndef CSC”部分突然退出了。
How can I get C# projects to build with Premake? 如何获得要使用Premake构建的C#项目?
I am on Ubuntu 15.10 with Mono and MonoDevelop installed, if that helps. 我在安装了Mono和MonoDevelop的Ubuntu 15.10上运行,如果有帮助的话。
对我有用的解决方案是将premake5与--dotnet=mono
标志一起使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.