Get vector length with GLM
Sorry folks for posting such a trivial issue! The issue is solved. I was using the wrong function. Here goes the correct one:

glm::vec2 testVec(6,-4);
float len  = glm::length(testVec);


The member function of the same name returns the number of components instead (i.e. vec2::length will always yield 2, vec3::length will always yield 3, etc.).