Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: Errors while compiling GLM in project

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2008
    Posts
    12

    Errors while compiling GLM in project

    Hello All,

    I am using glm 0.9.2.7 with VS 2010. In the code, I just include "#include <glm/glm.hpp>" statement.

    When I try to compile the code, VS throws errors like:

    [list][*]C2988: unrecognizable template declaration/definition func_common.hpp 251[*]error C2027: use of undefined type 'genType' func_common.hpp 251[*]error C2332: 'union' : missing tag name glm\core\func_common.inl 1311

    And many others like these. The first two are about isinf method. And the last one is about the unions.

    Any idea about the cause of these errors?

  2. #2
    Super Moderator Frequent Contributor Groovounet's Avatar
    Join Date
    Jul 2004
    Posts
    936

    Re: Errors while compiling GLM in project

    Did you have issues as well with GLM 0.9.2.6 or another older version?

    GLM 0.9.2.7 have been tested on Visual C++ 2010 with and without /Za so it should work.

    Do you define "isinf" in your own code with a define?

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2008
    Posts
    12

    Re: Errors while compiling GLM in project

    I started directly with 9.2.7. I will try 9.2.6 and let you know.

    And I haven't defined isinf in the code.

  4. #4
    Junior Member Newbie
    Join Date
    Jan 2008
    Posts
    12

    Re: Errors while compiling GLM in project

    Hi, I tried 9.2.6 as well. Still same errors. The errors I receive are like the following:

    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\./core/func_common.hpp(251): error C2027: use of undefined type 'genType'
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\./core/func_common.hpp(251): error C2988: unrecognizable template declaration/definition
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\./core/func_common.hpp(251): error C2059: syntax error : '('
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1255): error C2027: use of undefined type 'genType'
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1255): error C2988: unrecognizable template declaration/definition
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1255): error C2059: syntax error : '('
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1270): error C2974: 'glm::detail::tvec2' : invalid template argument for 'T', type expected
    1> c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\type_vec2.hpp( 32) : see declaration of 'glm::detail::tvec2'
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1273): error C2974: 'glm::detail::tvec2' : invalid template argument for 'T', type expected
    1> c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\type_vec2.hpp( 32) : see declaration of 'glm::detail::tvec2'
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1273): error C2974: 'glm::detail::tvec2' : invalid template argument for 'T', type expected
    1> c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\type_vec2.hpp( 32) : see declaration of 'glm::detail::tvec2'
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1274): error C2143: syntax error : missing ';' before '{'
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1274): error C2447: '{' : missing function header (old-style formal list?)
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1281): error C2027: use of undefined type 'glm::detail::tvec3'
    1> c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\type_vec3.hpp( 32) : see declaration of 'glm::detail::tvec3'
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1281): error C2988: unrecognizable template declaration/definition
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1281): error C2059: syntax error : '('
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1297): error C2143: syntax error : missing ';' before '{'
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1297): error C2447: '{' : missing function header (old-style formal list?)
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1311): error C2143: syntax error : missing ';' before 'identifier'
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1311): error C2332: 'union' : missing tag name
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1311): error C3306: 'glm::core::function::common::floatBitsToInt::<unn amed-tag>': unnamed class template is not allowed
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1311): error C2079: '$S1' uses undefined union 'glm::core::function::common::floatBitsToInt::<unn amed-type-$S1>'
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1311): error C2065: 'fi' : undeclared identifier
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1313): error C2065: 'fi' : undeclared identifier
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1314): error C2065: 'fi' : undeclared identifier
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1356): error C2143: syntax error : missing ';' before 'identifier'
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1356): error C2332: 'union' : missing tag name
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1356): error C3306: 'glm::core::function::common::floatBitsToUint::<un named-tag>': unnamed class template is not allowed
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1356): error C2079: '$S2' uses undefined union 'glm::core::function::common::floatBitsToUint::<un named-type-$S2>'
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1356): error C2065: 'fu' : undeclared identifier
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1358): error C2065: 'fu' : undeclared identifier
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1359): error C2065: 'fu' : undeclared identifier
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1401): error C2143: syntax error : missing ';' before 'identifier'
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1401): error C2332: 'union' : missing tag name
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1401): error C3306: 'glm::core::function::common::intBitsToFloat::<unn amed-tag>': unnamed class template is not allowed
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1401): error C2079: '$S3' uses undefined union 'glm::core::function::common::intBitsToFloat::<unn amed-type-$S3>'
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1401): error C2065: 'fi' : undeclared identifier
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1403): error C2065: 'fi' : undeclared identifier
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1404): error C2065: 'fi' : undeclared identifier
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1446): error C2143: syntax error : missing ';' before 'identifier'
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1446): error C2332: 'union' : missing tag name
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1446): error C3306: 'glm::core::function::common::uintBitsToFloat::<un named-tag>': unnamed class template is not allowed
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1446): error C2079: '$S4' uses undefined union 'glm::core::function::common::uintBitsToFloat::<un named-type-$S4>'
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1446): error C2065: 'fu' : undeclared identifier
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1448): error C2065: 'fu' : undeclared identifier
    1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\glm\core\func_common.in l(1449): error C2065: 'fu' : undeclared identifier

  5. #5
    Super Moderator Frequent Contributor Groovounet's Avatar
    Join Date
    Jul 2004
    Posts
    936

    Re: Errors while compiling GLM in project

    Do you want to use GLM within the Windows SDK?

    My experience of Microsoft being able to do define float and include stone age STL implementation with their SDK might explain some things here.

  6. #6
    Junior Member Newbie
    Join Date
    Jan 2008
    Posts
    12

    Re: Errors while compiling GLM in project

    I think I figured what the problem was. At some point of my code, I was also using TAUCS. Refering to your previous answer, I guess TAUCS was also defining "isinf". I removed TAUCS includes and it compiled. I will let you know if something else pops up.

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •