memononen/fontstash

Example does not build on mac

omikun opened this issue · 4 comments

I am using 10.9 with Xcode 5.0.2 and I get this when I try to build:

$ make
==== Building example (debug) ====
Linking example
Undefined symbols for architecture x86_64:
"_CVDisplayLinkCreateWithCGDisplay", referenced from:
__glfwPlatformGetVideoModes in libglfw3.a(cocoa_monitor.o)
__glfwPlatformGetVideoMode in libglfw3.a(cocoa_monitor.o)
"_CVDisplayLinkGetNominalOutputVideoRefreshPeriod", referenced from:
_vidmodeFromCGDisplayMode in libglfw3.a(cocoa_monitor.o)
"_CVDisplayLinkRelease", referenced from:
__glfwPlatformGetVideoModes in libglfw3.a(cocoa_monitor.o)
__glfwPlatformGetVideoMode in libglfw3.a(cocoa_monitor.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

It now works when I add -framework CoreVideo to LDFLAGS.

You need to be sure to link with the glfw library. Just go into build phases and add that lib.

On Jan 30, 2014, at 8:38 AM, "omikun" <notifications@github.commailto:notifications@github.com> wrote:

I am using 10.9 with Xcode 5.0.2 and I get this when I try to build:

$ make
==== Building example (debug) ====
Linking example
Undefined symbols for architecture x86_64:
"CVDisplayLinkCreateWithCGDisplay", referenced from:
_glfwPlatformGetVideoModes in libglfw3.a(cocoa_monitor.o)
__glfwPlatformGetVideoMode in libglfw3.a(cocoa_monitor.o)
"CVDisplayLinkGetNominalOutputVideoRefreshPeriod", referenced from:
_vidmodeFromCGDisplayMode in libglfw3.a(cocoamonitor.o)
"CVDisplayLinkRelease", referenced from:
_glfwPlatformGetVideoModes in libglfw3.a(cocoa_monitor.o)
__glfwPlatformGetVideoMode in libglfw3.a(cocoa_monitor.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

It now works when I add -framework CoreVideo to LDFLAGS.

Reply to this email directly or view it on GitHubhttps://github.com//issues/13.

Sorry for not commenting this earlier, I have fixed the premake file to include CoreVideo.

Got exactly the same trouble running this on mac although glfw3 was installed, just got a running version of it with CMake.

zzya commented

You need CoreVideo.framework,en... maybe you add the CoreAudio.framework.