memononen / fontstash

Light-weight online font texture atlas builder
zlib License
692 stars 88 forks source link

Example does not build on mac #13

Closed omikun closed 10 years ago

omikun commented 10 years ago

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.

mylocameron commented 10 years ago

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.com<mailto: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/memononen/fontstash/issues/13.

memononen commented 10 years ago

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

karimnaaji commented 10 years ago

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

zzya commented 7 years ago

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