LoginSignup
12
11

More than 5 years have passed since last update.

_CVDisplayLink関連のエラーが出た時の対処方法

Last updated at Posted at 2014-09-29

新しいMac(10.9,Xcode6)に移行してofxOpenNIを使ってたら以下のエラーが出たので、その対処方法。

Apple Mach-O Linker (Id) Error

Undefined symbols for architecture i386:
"_CVDisplayLinkGetNominalOutputVideoRefreshPeriod", referenced from:
_vidmodeFromCGDisplayMode in libglfw3.a(cocoa_monitor.m.o)
"_CVDisplayLinkCreateWithCGDisplay", referenced from:
__glfwSetVideoMode in libglfw3.a(cocoa_monitor.m.o)
__glfwPlatformGetVideoMode in libglfw3.a(cocoa_monitor.m.o)
__glfwPlatformGetVideoModes in libglfw3.a(cocoa_monitor.m.o)
"_CVDisplayLinkRelease", referenced from:
__glfwSetVideoMode in libglfw3.a(cocoa_monitor.m.o)
__glfwPlatformGetVideoMode in libglfw3.a(cocoa_monitor.m.o)
__glfwPlatformGetVideoModes in libglfw3.a(cocoa_monitor.m.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

CoreVideo.frameworkを追加する

  1. プロジェクトナビゲータでプロジェクトを選択
  2. 左のプルダウンからTargets以下を選択
  3. Generalタブを選択
  4. Linked Frameworks and Librariesの下にある”+”を選択して、CoreVideo.frameworkを追加する

参照元によると、古いoFだとoF自身のプロジェクトがCoreVideo.frameworkを持ってるのに対し、新しいoF(0.8.4とか?)だと個々のプロジェクト側でCoreVideo.frameworkを持つように変更されているため、とのこと。
多分OSのバージョンとか、Xcode6は関係ない模様。
参照元:Fix for _CVDisplayLinkRelease etc errors

以上、Mach-O Linker Errorの倒し方の一つ。

12
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
11