0

我尝试使用 Libraw 和 ... 在 Mac OSX 10.13.6 中使用 cmake 编译 ADobe DNG SDK 并得到此链接器错误:

Undefined symbols for architecture x86_64:
  "_CFCalendarComposeAbsoluteTime", referenced from:
      LocalTimeZone(dng_date_time const&) in libdng-sdk.a(dng_date_time.cpp.o)
  "_CFCalendarCreateWithIdentifier", referenced from:
      LocalTimeZone(dng_date_time const&) in libdng-sdk.a(dng_date_time.cpp.o)
  "_CFRelease", referenced from:
      CFReleaseHelper<__CFTimeZone const*>::~CFReleaseHelper() in libdng-sdk.a(dng_date_time.cpp.o)
      CFReleaseHelper<__CFCalendar*>::~CFReleaseHelper() in libdng-sdk.a(dng_date_time.cpp.o)
  "_CFTimeZoneCopyDefault", referenced from:
      LocalTimeZone(dng_date_time const&) in libdng-sdk.a(dng_date_time.cpp.o)
  "_CFTimeZoneGetSecondsFromGMT", referenced from:
      LocalTimeZone(dng_date_time const&) in libdng-sdk.a(dng_date_time.cpp.o)
  "_ConvertFromTextToUnicode", referenced from:
      Assign_Multibyte(dng_string&, char const*, unsigned int) in libdng-sdk.a(dng_string.cpp.o)
  "_ConvertFromUnicodeToText", referenced from:
      Extract_Multibyte(dng_string const&, dng_memory_data&, unsigned int) in libdng-sdk.a(dng_string.cpp.o)
  "_CreateTextEncoding", referenced from:
      Extract_Multibyte(dng_string const&, dng_memory_data&, unsigned int) in libdng-sdk.a(dng_string.cpp.o)
      Assign_Multibyte(dng_string&, char const*, unsigned int) in libdng-sdk.a(dng_string.cpp.o)
  "_CreateTextToUnicodeInfo", referenced from:
      Assign_Multibyte(dng_string&, char const*, unsigned int) in libdng-sdk.a(dng_string.cpp.o)
  "_CreateUnicodeToTextInfo", referenced from:
      Extract_Multibyte(dng_string const&, dng_memory_data&, unsigned int) in libdng-sdk.a(dng_string.cpp.o)
  "_DisposeTextToUnicodeInfo", referenced from:
      Assign_Multibyte(dng_string&, char const*, unsigned int) in libdng-sdk.a(dng_string.cpp.o)
  "_DisposeUnicodeToTextInfo", referenced from:
      Extract_Multibyte(dng_string const&, dng_memory_data&, unsigned int) in libdng-sdk.a(dng_string.cpp.o)
  "_UCCompareTextDefault", referenced from:
      dng_string::Compare(dng_string const&, bool) const in libdng-sdk.a(dng_string.cpp.o)
  "_UpgradeScriptInfoToTextEncoding", referenced from:
      Extract_SystemEncoding(dng_string const&, dng_memory_data&) in libdng-sdk.a(dng_string.cpp.o)
      Assign_SystemEncoding(dng_string&, char const*) in libdng-sdk.a(dng_string.cpp.o)
  "_kCFAllocatorDefault", referenced from:
      LocalTimeZone(dng_date_time const&) in libdng-sdk.a(dng_date_time.cpp.o)
  "_kCFGregorianCalendar", referenced from:
      LocalTimeZone(dng_date_time const&) in libdng-sdk.a(dng_date_time.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我尝试更改源代码,但我认为它没有错误,并附上我的 cmake 配置屏幕截图,看看是否有人可以帮助我解决这个问题

图片... 图片

Cmake:3.5 xcode:9.4.1

gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

谢谢

4

0 回答 0