對於我包括我有以下麻煩初始化openGL的使用Visual Studio 2012
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <cmath>
#include <GL/glut.h>
#include <GL/gl.h>
#include <GL/glu.h>
然而,當我嘗試編譯,我得到錯誤的整體轉換,沒有涉及到任何的源代碼我的正在使用。
錯誤1錯誤C2825: '_Iter':必須是類或命名空間,隨後當由 '::' C:\程序文件(86)\微軟的Visual Studio 11.0 \ VC \包括\ xutility 364 1的mp4
錯誤2錯誤C2039: '的iterator_category':不是 '`全局命名空間'」的成員C:\程序文件(86)\微軟的Visual Studio 11.0 \ VC \包括\ xutility 364 1的mp4
錯誤3錯誤C2146:語法錯誤:缺少';'標識符 '之前的iterator_category' C:\程序文件(86)\微軟的Visual Studio 11.0 \ VC \包括\ xutility 364 1的mp4
錯誤4錯誤C2602: '的std :: iterator_traits < _Iter> ::的iterator_category' 不是錯誤5錯誤C2868:'std:iterator_traits'是一個基類的成員,它的基類爲'std :: iterator_traits < _Iter>'c:\ program files(x86)\ microsoft visual studio 11.0 \ vc \ include \ xutility 364 1 mp4
錯誤5 error C2868: :iterator_traits < _Iter> :: iterator_category':使用聲明的非法語法;預計限定名C:\ Program Files文件(x86)的\微軟的Visual Studio 11.0 \ VC \包括\ xutility 364 1 MP4
...等...
我不知道文件是什麼xutility,或者編譯器爲什麼抱怨它。我高度懷疑它與我在VS 2012中設置openGL的方式有關,但我不確定。任何人都可以發現我的包含問題嗎?
您是否在解決方案的構建選項中包含了路徑? –
這是怎麼回事? – Zack
我手動將glut.h放入GL文件夾,其他兩個文件已經存在 – Zack