【问题标题】:Compilation Error when compiling Objective C program编译Objective C程序时出现编译错误
【发布时间】:2016-10-13 11:10:21
【问题描述】:

我正在尝试在 GNUStep 上运行一个 Objective C 程序,但它给出了以下错误:

C :/gnustep/bin/.../lib/gcc/mingw32/4.6.1/.../.../mingw32/bin/ld.exe :找不到lobj

collect : ld 返回 1 个退出状态

尝试了以下命令:

gcc -o helloworld helloworld.m -I /GNUstep/System/Library/Headers -L /GNUstep/System/Library/Libraries -lobjc -lgnustep-base -fconstant-string-class=NSConstantString

任何可能的修复?

【问题讨论】:

    标签: objective-c


    【解决方案1】:

    如果您尝试使用 gcc 编译器在终端或 cmd 中运行目标 c 代码,请参考此链接,

    https://www.tutorialspoint.com/objective_c/objective_c_environment_setup.htm

    它提供了在cmd和终端中运行目标c程序的逐步信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-19
      相关资源
      最近更新 更多