8
Problems linking against GLFW in OSXGLFW在OSX獅子
連接在生成文件的問題,我已經閱讀過這一點,但它似乎是一個不同的問題和我在一起。
在生成文件所述命令被RAN爲,
g++ -o main main.cpp -lglfw -framework Cocoa -framework OpenGL
當我運行生成文件是我收到的錯誤,
Undefined symbols for architecture x86_64:
"_IOMasterPort", referenced from:
__glfwInitJoysticks in libglfw.a(cocoa_joystick.o)
"_IOServiceMatching", referenced from:
__glfwInitJoysticks in libglfw.a(cocoa_joystick.o)
"_IOServiceGetMatchingServices", referenced from:
__glfwInitJoysticks in libglfw.a(cocoa_joystick.o)
"_IOIteratorNext", referenced from:
__glfwInitJoysticks in libglfw.a(cocoa_joystick.o)
"_IORegistryEntryCreateCFProperties", referenced from:
__glfwInitJoysticks in libglfw.a(cocoa_joystick.o)
"_IOCreatePlugInInterfaceForService", referenced from:
__glfwInitJoysticks in libglfw.a(cocoa_joystick.o)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [all] Error 1
非常感謝! – snarehanger 2012-07-20 11:30:33
您節省了我的日子:-) – Mayoneez 2012-07-20 18:56:12
只需在此添加一些細節:IOKit框架是必需的,因爲最近添加的OS X遊戲杆支持使用了它。 – elmindreda 2012-08-20 13:43:03