Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
编译g++;在XCode 5上? 我从C++中的OpenGL开始,我在XCODE上包含了我的项目的GLUT和OpenGL框架。当我尝试编译和运行我的程序就像它是一个简单的C++程序时,它给了我这个错误: Undefined symbols for architecture x86_64: "_glBegin", referenced from: display() in main.o "_glClear", referenced from: display() in main.o "_glClearColor", referenced from: etc. 使用简单的C++程序,我没有任何错误。我搜索了Web,发现我需要用G++(C++的特殊性)编译,但我不知道怎么做。有什么帮助吗?_C++_Xcode_Opengl_G++ - Fatal编程技术网

编译g++;在XCode 5上? 我从C++中的OpenGL开始,我在XCODE上包含了我的项目的GLUT和OpenGL框架。当我尝试编译和运行我的程序就像它是一个简单的C++程序时,它给了我这个错误: Undefined symbols for architecture x86_64: "_glBegin", referenced from: display() in main.o "_glClear", referenced from: display() in main.o "_glClearColor", referenced from: etc. 使用简单的C++程序,我没有任何错误。我搜索了Web,发现我需要用G++(C++的特殊性)编译,但我不知道怎么做。有什么帮助吗?

编译g++;在XCode 5上? 我从C++中的OpenGL开始,我在XCODE上包含了我的项目的GLUT和OpenGL框架。当我尝试编译和运行我的程序就像它是一个简单的C++程序时,它给了我这个错误: Undefined symbols for architecture x86_64: "_glBegin", referenced from: display() in main.o "_glClear", referenced from: display() in main.o "_glClearColor", referenced from: etc. 使用简单的C++程序,我没有任何错误。我搜索了Web,发现我需要用G++(C++的特殊性)编译,但我不知道怎么做。有什么帮助吗?,c++,xcode,opengl,g++,C++,Xcode,Opengl,G++,您需要将-framework OpenGL添加到您的编译器设置中。这个标题具有很强的误导性,我的印象是您试图编译gcc/g++。

您需要将
-framework OpenGL
添加到您的编译器设置中。

这个标题具有很强的误导性,我的印象是您试图编译gcc/g++。