1

尝试在 OSX 下编译项目的一部分时返回以下内容:

gcc -g -pipe -L/Projects/export buf_test.o buf.o -framework CoreFoundation -o buf_test
Undefined symbols for architecture x86_64:
  "___assert_rtn", referenced from:
      _init in buf.o
      _get in buf.o
      _put in buf.o
  "___sprintf_chk", referenced from:
      _test in buf_test.o
  "___strcpy_chk", referenced from:
      _test_data_copy in buf_test.o
      ___inline_strcpy_chk in buf_test.o
  "_exit", referenced from:
      start in crt1.10.6.o
  "_printf", referenced from:
      _test in buf_test.o
  "_puts", referenced from:
      _test in buf_test.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

帮助将不胜感激!

4

1 回答 1

0

原来这是与标准库的库命名冲突——我在 /Projects/export 中有一个名为 libSystem.a 的库,它掩盖了 libSystem.dylib 被发现。

于 2013-03-22T17:59:13.397 回答