PDA

View Full Version : Project doesn't compile with include <glm/glm>



marek-knows.com
12-18-2011, 08:42 AM
I just downloaded glm-0.9.3.B and unzipped it onto my HDD.
I setup an environment variable named GLM_SDK to point to the root directory where I unzipped glm
I'm using Visual Studio 2010 Professional
In my project settings I added $(GLM_SDK) to the "Additional Include Directories" setting
In my precompiled header (stdafx.h) I added the line: #include <glm/glm.hpp>

My file looks like this:


#ifndef STDAFX_H
#define STDAFX_H

#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include "targetver.h"
#include <windows.h>
#include <conio.h> //_getch

#include <vector> //std::vector/array
#include <string> //std::string
#include <sstream> //std::ostringstream
#include <algorithm> //std::transform, sort
#include <fstream> //file handling

#include <iostream> //cout
#include <iomanip> //std::setw, setfill

#include <tchar.h>

// GLM Library ----------------------------------------------
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>

#endif //STDAFX_H





When I try to compile my precompiled headers I get all of the following errors. Does anyone know how to fix this?



1>------ Build started: Project: Engine, Configuration: Debug Win32 ------
1> stdafx.cpp
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(360): error C2059: syntax error : 'constant'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(363): error C2143: syntax error : missing ';' before '}'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(363): error C2238: unexpected token(s) preceding ';'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(373): error C2065: 'int8' : undeclared identifier
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(376): error C2913: explicit specialization; 'glm::float_or_int_trait' is not a specialization of a class template
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(382): error C2913: explicit specialization; 'glm::float_or_int_trait' is not a specialization of a class template
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(388): error C2913: explicit specialization; 'glm::float_or_int_trait' is not a specialization of a class template
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(394): error C2913: explicit specialization; 'glm::float_or_int_trait' is not a specialization of a class template
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(400): error C2913: explicit specialization; 'glm::float_or_int_trait' is not a specialization of a class template
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(406): error C2913: explicit specialization; 'glm::float_or_int_trait' is not a specialization of a class template
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(412): error C2913: explicit specialization; 'glm::float_or_int_trait' is not a specialization of a class template
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(418): error C2913: explicit specialization; 'glm::float_or_int_trait' is not a specialization of a class template
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(424): error C2913: explicit specialization; 'glm::float_or_int_trait' is not a specialization of a class template
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(430): error C2913: explicit specialization; 'glm::float_or_int_trait' is not a specialization of a class template
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(436): error C2913: explicit specialization; 'glm::float_or_int_trait' is not a specialization of a class template
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(439): error C2059: syntax error : '}'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(439): error C2143: syntax error : missing ';' before '}'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(439): error C2059: syntax error : '}'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.hpp(34): error C2143: syntax error : missing ';' before '{'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.hpp(34): error C2447: '{' : missing function header (old-style formal list?)
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(48): error C2065: 'hdata' : undeclared identifier
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(48): error C2146: syntax error : missing ')' before identifier 'value'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(48): error C2433: 'toFloat32' : 'inline' not permitted on data declarations
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(48): error C2059: syntax error : ')'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(49): error C2143: syntax error : missing ';' before '{'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(49): error C2447: '{' : missing function header (old-style formal list?)
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(122): error C2146: syntax error : missing ';' before identifier 'toFloat16'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(122): error C2433: 'hdata' : 'inline' not permitted on data declarations
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(122): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(123): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(186): error C2064: term does not evaluate to a function taking 1 arguments
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(186): error C2617: 'glm::detail::toFloat16' : inconsistent return statement
1> c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(122) : see declaration of 'glm::detail::toFloat16'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(197): error C2064: term does not evaluate to a function taking 1 arguments
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(197): error C2617: 'glm::detail::toFloat16' : inconsistent return statement
1> c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(122) : see declaration of 'glm::detail::toFloat16'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(212): error C2064: term does not evaluate to a function taking 1 arguments
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(212): error C2617: 'glm::detail::toFloat16' : inconsistent return statement
1> c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(122) : see declaration of 'glm::detail::toFloat16'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(245): error C2064: term does not evaluate to a function taking 1 arguments
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(245): error C2617: 'glm::detail::toFloat16' : inconsistent return statement
1> c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(122) : see declaration of 'glm::detail::toFloat16'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(253): error C2146: syntax error : missing ';' before identifier 'Hdata'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(253): error C3861: 'Hdata': identifier not found
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(255): error C2065: 'Hdata' : undeclared identifier
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(259): error C2027: use of undefined type 'glm::detail::half'
1> c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(41) : see declaration of 'glm::detail::half'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(259): error C2059: syntax error : ')'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(261): error C2448: 'data' : function-style initializer appears to be a function definition
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(263): error C2027: use of undefined type 'glm::detail::half'
1> c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(41) : see declaration of 'glm::detail::half'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(263): error C2143: syntax error : missing ')' before 'const'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(263): error C2143: syntax error : missing ';' before 'const'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(263): error C2079: 'half' uses undefined class 'glm::detail::half'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(263): error C2433: 'half' : 'inline' not permitted on data declarations
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(263): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(263): error C2059: syntax error : ')'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(263): error C2470: 's' : looks like a function definition, but there is no parameter list; skipping apparent body
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(268): error C2039: '{ctor}' : is not a member of 'glm::detail::half'
1> c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(41) : see declaration of 'glm::detail::half'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(270): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(270): error C2373: 'glm::detail::half' : redefinition; different type modifiers
1> c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(263) : see declaration of 'glm::detail::half'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(270): error C2904: 'half' : name already used for a template in the current scope
1> c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(41) : see declaration of 'glm::detail::half'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(273): error C2510: 'half' : left of '::' must be a class/struct/union
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(276): error C2270: '$S1' : modifiers not allowed on nonmember functions
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(276): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(279): error C2143: syntax error : missing ';' before '&amp;'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(279): error C2433: 'half' : 'inline' not permitted on data declarations
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(279): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(279): error C2086: 'int glm::detail::half' : redefinition
1> c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(263) : see declaration of 'glm::detail::half'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(279): error C2027: use of undefined type 'glm::detail::half'
1> c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(41) : see declaration of 'glm::detail::half'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(279): error C2143: syntax error : missing ')' before 'const'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(279): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(279): error C2059: syntax error : ')'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(280): error C2143: syntax error : missing ';' before '{'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(280): error C2447: '{' : missing function header (old-style formal list?)
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(285): error C2143: syntax error : missing ';' before '&amp;'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(285): error C2433: 'half' : 'inline' not permitted on data declarations
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(285): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(285): error C2086: 'int glm::detail::half' : redefinition
1> c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(263) : see declaration of 'glm::detail::half'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(285): error C2027: use of undefined type 'glm::detail::half'
1> c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(41) : see declaration of 'glm::detail::half'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(285): error C2143: syntax error : missing ')' before 'const'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(285): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(285): error C2059: syntax error : ')'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(286): error C2143: syntax error : missing ';' before '{'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(286): error C2447: '{' : missing function header (old-style formal list?)
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(291): error C2143: syntax error : missing ';' before '&amp;'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(291): error C2433: 'half' : 'inline' not permitted on data declarations
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(291): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(291): error C2086: 'int glm::detail::half' : redefinition
1> c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(263) : see declaration of 'glm::detail::half'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(291): error C2027: use of undefined type 'glm::detail::half'
1> c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(41) : see declaration of 'glm::detail::half'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(291): error C2143: syntax error : missing ')' before 'const'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(291): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(291): error C2059: syntax error : ')'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(292): error C2143: syntax error : missing ';' before '{'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(292): error C2447: '{' : missing function header (old-style formal list?)
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(297): error C2143: syntax error : missing ';' before '&amp;'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(297): error C2433: 'half' : 'inline' not permitted on data declarations
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(297): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(297): error C2086: 'int glm::detail::half' : redefinition
1> c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(263) : see declaration of 'glm::detail::half'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(297): error C2027: use of undefined type 'glm::detail::half'
1> c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(41) : see declaration of 'glm::detail::half'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(297): error C2143: syntax error : missing ')' before 'const'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(297): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(297): error C2059: syntax error : ')'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(298): error C2143: syntax error : missing ';' before '{'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(298): error C2447: '{' : missing function header (old-style formal list?)
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(303): error C2143: syntax error : missing ';' before '&amp;'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(303): error C2433: 'half' : 'inline' not permitted on data declarations
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(303): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(303): error C2086: 'int glm::detail::half' : redefinition
1> c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(263) : see declaration of 'glm::detail::half'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(303): error C2027: use of undefined type 'glm::detail::half'
1> c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(41) : see declaration of 'glm::detail::half'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(303): error C2143: syntax error : missing ')' before 'const'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(303): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(303): error C2059: syntax error : ')'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(304): error C2143: syntax error : missing ';' before '{'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(304): error C2447: '{' : missing function header (old-style formal list?)
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(309): error C2143: syntax error : missing ';' before '&amp;'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(309): error C2433: 'half' : 'inline' not permitted on data declarations
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(309): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(309): error C2086: 'int glm::detail::half' : redefinition
1> c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(263) : see declaration of 'glm::detail::half'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(309): error C2027: use of undefined type 'glm::detail::half'
1> c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\_detail.hpp(41) : see declaration of 'glm::detail::half'
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(310): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(311): error C2065: 'data' : undeclared identifier
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(312): error C2355: 'this' : can only be referenced inside non-static member functions
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(312): error C2227: left of '->data' must point to class/struct/union/generic type
1>c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_half.inl(312): fatal error C1003: error count exceeds 100; stopping compilation
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

obirsoy
12-18-2011, 09:19 AM
That bug just got fixed yesterday. If you can't get the latest source from git, the quick solution is to "#undef ERROR" after windows.h include.



#include <windows.h>
#undef ERROR

marek-knows.com
12-18-2011, 04:40 PM
Okay that got me a little further.

I wrote the following code:



_m4ModelView = glm::translate( glm::mat4( 1.0f ), glm::vec3( 0, 0, -1.5f ) );


where _m4ModelView is constructed to by the identity matrix in my class. This gives me the following error:



1>c:\users\marek\documents\visual studio 2010\projects\shaderengine\game\game.cpp(440): error C2678: binary '=' : no operator found which takes a left-hand operand of type 'const glm::mat4' (or there is no acceptable conversion)
1> c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_mat4x4.inl(362): could be 'glm::detail::tmat4x4<T> &amp;glm::detail::tmat4x4<T>::operator =<glm::lowp_float>(const glm::detail::tmat4x4<T> &amp;)'
1> with
1> [
1> T=glm::lowp_float
1> ]
1> c:\program files (x86)\programming libraries\glm-0.9.3.b\glm\core\type_mat4x4.hpp(138): or 'glm::detail::tmat4x4<T> &amp;glm::detail::tmat4x4<T>::operator =(const glm::detail::tmat4x4<T> &amp;)'
1> with
1> [
1> T=glm::lowp_float
1> ]
1> while trying to match the argument list '(const glm::mat4, glm::detail::tmat4x4<T>)'
1> with
1> [
1> T=glm::lowp_float
1> ]
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


I noticed that if I replace _m4ModelView with glm::mat4 modelView (ie local variable rather than member variable) then the code does compile.

What is going on here?

sqrt[-1]
12-20-2011, 04:53 PM
You calling this inside a "const" method?
(or is _m4ModelView const in its declaration?)