patriciogonzalezvivo / glslViewer

Console-based GLSL Sandbox for 2D/3D shaders
BSD 3-Clause "New" or "Revised" License
4.73k stars 350 forks source link

Make error with glm on OSX #17

Closed bruzed closed 9 years ago

bruzed commented 9 years ago

hi! i get the following error when i try to make:

λ brucemacpro glslViewer → λ git master* → make
src/3d/node.o
g++ -Wall -g -std=c++0x -fpermissive -DPLATFORM_OSX -stdlib=libc++ -I/usr/local/Cellar/glfw3/3.1.1/include  -I/usr/local/include/ -Isrc/ -Iinclude/ -O3 -I//Library/Frameworks/GLUI.framework -g -c src/3d/node.cpp -o src/3d/node.o -Wno-deprecated-declarations
In file included from src/3d/node.cpp:3:
In file included from /usr/local/include/glm/gtx/matrix_decompose.hpp:70:
/usr/local/include/glm/gtx/matrix_decompose.inl:128:11: error: no viable overloaded '='
                        Row[i] = LocalMatrix[i];
                        ~~~~~~ ^ ~~~~~~~~~~~~~~
src/3d/node.cpp:22:10: note: in instantiation of function template specialization 'glm::decompose<float, 0>' requested here
    glm::decompose(m_transformMatrix, m_scale, m_orientation, m_position, skew, perspective );
         ^
/usr/local/include/glm/detail/type_vec3.hpp:49:9: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'col_type'
      (aka 'tvec4<float, (glm::precision)0U>') to 'const glm::tvec3<float, 0>' for 1st argument
        struct tvec3
               ^
/usr/local/include/glm/detail/type_vec3.hpp:49:9: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'col_type'
      (aka 'tvec4<float, (glm::precision)0U>') to 'glm::tvec3<float, 0>' for 1st argument
        struct tvec3
               ^
/usr/local/include/glm/detail/type_vec3.hpp:188:31: note: candidate template ignored: could not match 'tvec3' against 'tvec4'
                GLM_FUNC_DECL tvec3<T, P> & operator=(tvec3<U, P> const & v);
                                            ^
In file included from src/3d/node.cpp:3:
In file included from /usr/local/include/glm/gtx/matrix_decompose.hpp:70:
/usr/local/include/glm/gtx/matrix_decompose.inl:133:3: error: no matching function for call to 'v3Scale'
                v3Scale(Row[0], 1.0);
                ^~~~~~~
/usr/local/include/glm/gtx/matrix_decompose.inl:47:26: note: candidate template ignored: deduced conflicting types for parameter 'T' ('float' vs. 'double')
        GLM_FUNC_QUALIFIER void v3Scale(tvec3<T, P> & v, T desiredLength)
                                ^
/usr/local/include/glm/gtx/matrix_decompose.inl:137:12: error: no matching function for call to 'combine'
                Row[1] = combine(Row[1], Row[0], 1.0, -Skew.z);
                         ^~~~~~~
/usr/local/include/glm/gtx/matrix_decompose.inl:38:33: note: candidate template ignored: deduced conflicting types for parameter 'T' ('float' vs. 'double')
        GLM_FUNC_QUALIFIER tvec3<T, P> combine(
                                       ^
/usr/local/include/glm/gtx/matrix_decompose.inl:141:3: error: no matching function for call to 'v3Scale'
                v3Scale(Row[1], 1.0);
                ^~~~~~~
/usr/local/include/glm/gtx/matrix_decompose.inl:47:26: note: candidate template ignored: deduced conflicting types for parameter 'T' ('float' vs. 'double')
        GLM_FUNC_QUALIFIER void v3Scale(tvec3<T, P> & v, T desiredLength)
                                ^
/usr/local/include/glm/gtx/matrix_decompose.inl:146:12: error: no matching function for call to 'combine'
                Row[2] = combine(Row[2], Row[0], 1.0, -Skew.y);
                         ^~~~~~~
/usr/local/include/glm/gtx/matrix_decompose.inl:38:33: note: candidate template ignored: deduced conflicting types for parameter 'T' ('float' vs. 'double')
        GLM_FUNC_QUALIFIER tvec3<T, P> combine(
                                       ^
/usr/local/include/glm/gtx/matrix_decompose.inl:148:12: error: no matching function for call to 'combine'
                Row[2] = combine(Row[2], Row[1], 1.0, -Skew.x);
                         ^~~~~~~
/usr/local/include/glm/gtx/matrix_decompose.inl:38:33: note: candidate template ignored: deduced conflicting types for parameter 'T' ('float' vs. 'double')
        GLM_FUNC_QUALIFIER tvec3<T, P> combine(
                                       ^
/usr/local/include/glm/gtx/matrix_decompose.inl:152:3: error: no matching function for call to 'v3Scale'
                v3Scale(Row[2], 1.0);
                ^~~~~~~
/usr/local/include/glm/gtx/matrix_decompose.inl:47:26: note: candidate template ignored: deduced conflicting types for parameter 'T' ('float' vs. 'double')
        GLM_FUNC_QUALIFIER void v3Scale(tvec3<T, P> & v, T desiredLength)
                                ^
7 errors generated.
make: *** [src/3d/node.o] Error 1
patriciogonzalezvivo commented 9 years ago

Hi! Seams you are loading glm from your own computer system (/usr/local/include/glm/gtx/matrix_decompose.hpp) instead from the local include. Probably updating the system glm to the last version will solve it... or... not including the /usr/local/include on the makefile. : /

Any preference. Let me know how that works

bruzed commented 9 years ago

Removing /usr/local/include from the makefile worked! Thanks!