【问题标题】:Compiling App Wrappers with GNUStep使用 GNUStep 编译 App Wrappers
【发布时间】:2012-01-11 23:20:00
【问题描述】:

我按照 GNUStep 网站上的指示逐字执行。这是我的制作文件。

include $(GNUSTEP_MAKEFILES)/common.make

APP_NAME = FirstApp

FirstApp_OBJC_FILES = main.m \
MyController.m

FirstApp_MAIN_MODEL_FILE = FirstApp.gorm

FirstApp_RESOURCE_FILES = FirstApp.gorm

include $(GNUSTEP_MAKEFILES)/application.make

这是目录的内容(请注意,在教程中没有提到创建 main.m 文件。我认为这是以某种方式自动生成的。如果这是教程作者部分的遗漏,请告诉我。还有 main.m 文件应该包含什么。

FirstApp.gorm  GNUmakefile  MyController.h  MyController.m  MyController.m~

我通过切换到目录并运行 make 进行编译,这是我收到的输出。

This is gnustep-make 2.6.1. Type 'make print-gnustep-make-help' for help.
Making all for app FirstApp...
 Creating FirstApp.app/....
make[3]: *** No rule to make target `obj/FirstApp.obj/main.m.o', needed by `FirstApp.app/./FirstApp'.  Stop.
make[2]: *** [internal-app-run-compile-submake] Error 2
make[1]: *** [FirstApp.all.app.variables] Error 2
make: *** [internal-all] Error 2

现在我可以看到这与 main.m 文件有关,但从输出中我不确定从这里到哪里。任何帮助将不胜感激,因为我是 GNUstep 的新手。我在使用 gorm 时是否错误地删除了它的创建?

【问题讨论】:

    标签: objective-c grails-orm gnustep


    【解决方案1】:

    几个小时后,我在这里找到了一个很棒的教程。链接在这里。 Main 文件基本上应该是这样的:

    #include <AppKit/NSApplication.h>
    
    int main(int argc, const char *argv[]) 
    {
       return NSApplicationMain (argc, argv);
    }
    

    这是链接

    http://gnustep.made-it.com/GSPT/xml/Tutorial_en.html#AEN412

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多