0

我在我的代码中包含了一些 GLM 文件,并且收到了大量错误(至少 90 个)。为什么会这样,我不知道。我正在使用最新的 GLM(撰写本文时为 0.9.3.3)。我也在 Windows 上使用 Qt Creator,你会看到一个 QMake 文件。

我还应该注意,我最终将 glm 文件夹复制到了我的 mingw 文件夹中的包含目录。

我能做些什么来解决这个问题?

制作

CONFIG += console

HEADERS += \
    util.hpp \
    ShaderComparable.hpp \
    SearchTree.hpp \
    FileUtility.hpp \
    Debug.hpp \
    ShaderHandler.hpp \
    Shader.hpp \
    Testing.hpp \
    Sphere.hpp \
    Shape.hpp \
    Circle.hpp \
    Maths.hpp

SOURCES += \
    util.cpp \
    ShaderComparable.cpp \
    SearchTree.inl \
    Main.cpp \
    FileUtility.cpp \
    Debug.cpp \
    ShaderHandler.cpp \
    Testing.cpp \
    Sphere.cpp \
    Shape.cpp \
    Circle.cpp

win32:LIBS += -llibEGL -llibGLESv2
unix: LIBS += -lEGL -lGLESv2

QMAKE_CXXFLAGS += -std=c++0x -U__STRICT_ANSI__

错误

c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp: In instantiation of 'glm::detail::tvec4<glm::detail::half>::<anonymous union>':
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:82:   instantiated from 'glm::detail::tvec4<glm::detail::half>'
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./gtc/swizzle.hpp:114:   instantiated from here
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:79: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::r' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:79: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::r' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:79: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::g' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:79: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::g' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:79: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::b' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:79: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::b' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:79: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::a' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:79: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::a' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:80: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::s' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:80: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::s' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:80: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::t' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:80: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::t' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:80: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::p' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:80: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::p' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:80: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::q' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:80: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::q' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:81: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::x' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:81: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::x' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:81: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::y' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:81: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::y' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:81: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::z' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:81: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::z' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:81: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::w' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec4.hpp:81: error: member 'glm::detail::half glm::detail::tvec4<glm::detail::half>::<anonymous union>::<anonymous struct>::w' with copy assignment operator not allowed in union
mingw32-make.exe[1]: Leaving directory `C:/Programming/C++/Qt/qtesc/esc/Debug'
In file included from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type.hpp:40,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/glm.hpp:97,
                 from ../esc/Maths.hpp:3,
                 from ../esc/Sphere.hpp:5,
                 from ../esc/Sphere.cpp:1:
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp: In instantiation of 'glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>':
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:82:   instantiated from 'glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >'
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./virtrev/xstream.hpp:92:   instantiated from here
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:79: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::r' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:79: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::r' with destructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:79: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::r' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:79: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::g' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:79: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::g' with destructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:79: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::g' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:79: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::b' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:79: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::b' with destructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:79: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::b' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:80: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::s' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:80: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::s' with destructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:80: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::s' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:80: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::t' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:80: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::t' with destructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:80: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::t' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:80: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::p' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:80: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::p' with destructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:80: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::p' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:81: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::x' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:81: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::x' with destructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:81: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::x' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:81: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::y' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:81: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::y' with destructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:81: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::y' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:81: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::z' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:81: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::z' with destructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec3.hpp:81: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec3<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::z' with copy assignment operator not allowed in union
In file included from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type.hpp:39,
                 from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/glm.hpp:97,
                 from ../esc/Maths.hpp:3,
                 from ../esc/Sphere.hpp:5,
                 from ../esc/Sphere.cpp:1:
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec2.hpp: In instantiation of 'glm::detail::tvec2<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>':
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec2.hpp:82:   instantiated from 'glm::detail::tvec2<std::basic_ostream<char, std::char_traits<char> > >'
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./virtrev/xstream.hpp:92:   instantiated from here
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec2.hpp:79: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec2<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::r' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec2.hpp:79: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec2<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::r' with destructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec2.hpp:79: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec2<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::r' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec2.hpp:79: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec2<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::g' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec2.hpp:79: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec2<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::g' with destructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec2.hpp:79: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec2<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::g' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec2.hpp:80: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec2<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::s' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec2.hpp:80: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec2<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::s' with destructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec2.hpp:80: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec2<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::s' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec2.hpp:80: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec2<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::t' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec2.hpp:80: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec2<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::t' with destructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec2.hpp:80: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec2<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::t' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec2.hpp:81: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec2<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::x' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec2.hpp:81: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec2<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::x' with destructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec2.hpp:81: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec2<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::x' with copy assignment operator not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec2.hpp:81: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec2<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::y' with constructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec2.hpp:81: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec2<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::y' with destructor not allowed in union
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/glm/glm/./core/type_vec2.hpp:81: error: member 'std::basic_ostream<char, std::char_traits<char> > glm::detail::tvec2<std::basic_ostream<char, std::char_traits<char> > >::<anonymous union>::<anonymous struct>::y' with copy assignment operator not allowed in union
4

2 回答 2

1

我有这个问题。这是因为 glm 不适用于 -std=c++0x。你必须使用 c++98。

于 2013-01-10T19:58:26.023 回答
0

我通过不包括 修复了大部分错误glm/ext.hpp,因为这似乎是造成损害的原因。如果有人知道为什么会发生这种情况,很高兴收到您的来信。

于 2012-05-28T17:16:36.327 回答