2015-05-05 25 views
0

我正在將一個食人魔應用程序升級爲使用較新版本的食人魔,並遇到了一些與mingw一起編譯此問題的問題,現在使用glm升級了庫。與mingw32(ogre3d + cegui + glm應用程序)的標頭衝突錯誤

編譯時我遇到了一些錯誤的是這樣的:

In file included from c:\mingw\bin../lib/gcc/i686-w64-mingw32/4.7.3/include/xmmintrin.h:36:0, 
from C:/mingw/OgreSDK/include/OGRE/OgreCommon.h:35, 
from C:/mingw/OgreSDK/include/OGRE/OgreMath.h:34, 
from D:/Users/jacob/Documents/git/ThriveDirectReview2/src/engine/serialization.h:7, 
from D:\Users\jacob\Documents\git\ThriveDirectReview2\src\engine\engine.cpp:8: 
c:\mingw\bin../lib/gcc/i686-w64-mingw32/4.7.3/include/mmintrin.h:53:1: error: previous declaration of 'void _m_empty()' with 'C++' linkage 
In file included from C:/mingw/install/include/glm/core/setup.hpp:549:0, 
from C:/mingw/install/include/glm/glm.hpp:89, 
from C:/mingw/install/include/cegui-9999/CEGUI/../CEGUI/Size.h:37, 
from C:/mingw/install/include/cegui-9999/CEGUI/../CEGUI/Rect.h:33, 
from C:/mingw/install/include/cegui-9999/CEGUI/../CEGUI/Image.h:33, 
from C:/mingw/install/include/cegui-9999/CEGUI/../CEGUI/BitmapImage.h:30, 
from C:/mingw/install/include/cegui-9999/CEGUI/../CEGUI/CEGUI.h:37, 
from D:\Users\jacob\Documents\git\ThriveDirectReview2\src\engine\engine.cpp:21: 

看着/glm/core/setup.hpp:549:0我們:

if defined(MINGW32) && (GLM_ARCH != GLM_ARCH_PURE) 
include intrin.h 
endif 

所以食人魔(圖形庫)使用gcc的xmmintrin頭文件,而cegui(gui庫爲怪物建造)也使用gcc的intrin.h,這兩個頭文件定義了幾乎相同的接口並導致衝突。

所有相關的源代碼可以在這裏找到: https://github.com/Revolutionary-Games/Thrive/tree/ogre2.0

所以這樣看來,GLM是用gcc這似乎很奇怪,我不兼容。更令人驚訝的是,cegui並沒有與食人魔合作,所以我的第一步是在cegui論壇發佈:http://cegui.org.uk/forum/viewtopic.php?f=10&t=7024,但他們無法提供幫助。

這看起來像是一個非常專業化的問題,可能太專門針對堆棧溢出了,但我希望你能提供幫助,或給出一個解決問題的方向的建議!

編輯:發現兩個* intrin文件都來自gcc。

回答