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