首页 > Unix/Linux > GNUmakefile native-objc-exceptions does not match that of gnustep-base

GNUmakefile native-objc-exceptions does not match that of gnustep-base

  参考资料: http://www.gnustep.it/nicola/Tutorials/WritingMakefiles/WritingMakefiles.html
  在使用GNUmakefile文件的时候,按照官方文档建好之后却编译失败了,报错误:
error: #error The current setting for native-objc-exceptions does not match that of gnustep-base … please correct this.
h.m: In function ‘main’:
h.m:4: error: stray ‘@’ in program
h.m:4: error: ‘autoreleasepool’ undeclared (first use in this function)
h.m:4: error: (Each undeclared identifier is reported only once
h.m:4: error: for each function it appears in.)
h.m:4: error: expected ‘;’ before ‘{’ token
gmake[3]: *** [obj/h.obj/h.m.o] Error 1
gmake[2]: *** [internal-tool-all_] Error 2
gmake[1]: *** [h.all.tool.variables] Error 2
make: *** [internal-all] Error 2

解决方法:
在安装目录下找到GSConfig.h文件中的下面一行

#define BASE_NATIVE_OBJC_EXCEPTIONS 0

(1)使用gcc指令进行编译时,更改为

#define BASE_NATIVE_OBJC_EXCEPTIONS 0

(2)使用GNUmakefile文件,需要改为

#define BASE_NATIVE_OBJC_EXCEPTIONS 1

转载请注明: 转载自阿凡树的博客

本文链接地址: GNUmakefile native-objc-exceptions does not match that of gnustep-base

  1. 还没有评论
评论提交中, 请稍候...

留言

可以使用的标签: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Trackbacks & Pingbacks ( 0 )
  1. 还没有 trackbacks