0

尝试在 Win7 下使用 Visual Studio 2010 和 Qt5.2/Qt3D编译此项目时,出现以下错误:

error LNK1169: one or more multiply defined symbols found   C:\OculusQt3D\oculusqt3d\build\Debug\OculusQt3D.exe 1
error LNK2005: "public: __thiscall QArray<class QVector3D,8>::~QArray<class QVector3D,8>(void)" (??1?$QArray@VQVector3D@@$07@@QAE@XZ) already defined in mdstate.obj    C:\OculusQt3D\oculusqt3d\build\Qt53Dd.lib(Qt53Dd.dll)
error LNK2005: "public: __thiscall QArray<class QVector3D,8>::QArray<class QVector3D,8>(void)" (??0?$QArray@VQVector3D@@$07@@QAE@XZ) already defined in Qt53Dd.lib(Qt53Dd.dll)  C:\OculusQt3D\oculusqt3d\build\MULTIBILLBOARD_LIBRARY.lib(databundle.obj)
error LNK2005: "public: int __thiscall QArray<class QVector3D,8>::size(void)const " (?size@?$QArray@VQVector3D@@$07@@QBEHXZ) already defined in mdstate.obj C:\OculusQt3D\oculusqt3d\build\Qt53Dd.lib(Qt53Dd.dll)

提到的文件是mdstate.h / mdstate.cppdatabundle.h / databundle.cppqarray.h / qarray.cpp

谷歌搜索后,这个错误可能源于很多可能性,但我无法理解这种情况。

通常这是由于包含 .cpp 而不是标头、意外包含文件多次、缺少包含保护和类似的东西而导致的,这里不是这种情况。

那么,有人知道这里有什么问题吗?

4

0 回答 0