有一个使用的最小示例GLFW3
:
#include <GLFW/glfw3.h>
int main(int argc, const char * argv[]) {
glfwInit();
}
...导致大量链接器错误:(摘录)
Undefined symbols for architecture x86_64:
"_CFArrayAppendValue", referenced from:
_addJoystickElement in libglfw3.a(cocoa_joystick.m.o)
"_CFArrayApplyFunction", referenced from:
__glfwInitJoysticks in libglfw3.a(cocoa_joystick.m.o)
_addJoystickElement in libglfw3.a(cocoa_joystick.m.o)
"_CFArrayCreateMutable", referenced from:
__glfwInitJoysticks in libglfw3.a(cocoa_joystick.m.o)
...
"_objc_msgSend_fixup", referenced from:
l_objc_msgSend_fixup_count in libglfw3.a(cocoa_monitor.m.o)
l_objc_msgSend_fixup_objectAtIndex_ in libglfw3.a(cocoa_monitor.m.o)
l_objc_msgSend_fixup_objectForKey_ in libglfw3.a(cocoa_monitor.m.o)
l_objc_msgSend_fixup_alloc in libglfw3.a(cocoa_init.m.o)
l_objc_msgSend_fixup_release in libglfw3.a(cocoa_init.m.o)
l_objc_msgSend_fixup_alloc in libglfw3.a(nsgl_context.m.o)
l_objc_msgSend_fixup_release in libglfw3.a(nsgl_context.m.o)
...
OpenGL.framework
并且libglfw3.a
两者都有联系。
这是什么原因?之前编译一个glfw2
应用程序就像一个魅力。