我刚刚在Windows上的目标C中启动了我的“Hello World”程序。我已经安装了“gnusetp.org”网站上的所有相关软件。我创建一个hello world程序并将其保存在“c:\ hello.m”目录中。我想知道我将如何编译它?我正在使用gnsetup可执行文件运行命令提示符我看到“sh.exe -41。$”。接下来我要做什么来编译并运行良好? 感谢
答案 0 :(得分:0)
在gnustep提示符下,cd到C:\并试试这个(注意:这只是一行):
gcc -o hello.exe hello.m -std = c99 -I / GNUstep / System / Library / Headers -L / GNUstep / System / Library / Libraries -lobjc -lgnustep-base -fconstant-string-class = NSConstantString -fobjc-exceptions