简体   繁体   中英

What am I missing in my compilation / linking stage of this C++ FreeType GLFW application?

g++ -framework OpenGL GLFT_Font.cpp test.cpp -o test -Wall -pedantic -lglfw  -lfreetype -    pthread `freetype-config --cflags`
Undefined symbols:
  "_GetEventKind", referenced from:
      __glfwKeyEventHandler in libglfw.a(macosx_window.o)
      __glfwMouseEventHandler in libglfw.a(macosx_window.o)
      __glfwWindowEventHandler in libglfw.a(macosx_window.o)
  "_ShowWindow", referenced from:
      __glfwPlatformOpenWindow in libglfw.a(macosx_window.o)
  "_MenuSelect", referenced from:

This is on Mac OS X.

I am trying to get GLFT_FONT to work on MacOSX with GLFW and FreeType2. This is not the standard Makefile. I changed parts of it myself (like the "-framework OpenGL"

I am from Linux land, a bit new to Mac.

I am on Mac OS X 10.5.8; using XCode 3.1.3

Thanks!

I tink those come from the Carbon framework.

LIBS += -framework Carbon

should do it then.

You need to link against the Carbon and AGL frameworks as well, ie

-framework AGL -framework Carbon

Also note that GLFW 2.6 only works as 32-bit on Mac OS X.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM