Using CMake is pretty straightforward. You fire up CMake-gui, open the CMakeLists.txt in kazmath, and click on configure and generate.
Then you should have a Visual Studio solution in the kazmath folder which you need to open and compile like any other program/library. Let me know if that still doesnt fix it.
I think the problem is the 1.0f in your glTranslatef calls. Remember that glTranslatef will translate your whole scene about the vector your plug in, and by calling it several times these translations are accumulated. So if you want to stay on one of your grid lines, you just advance x or z by 16, but leave all others 0.
Hope that helps even though we kept you waiting so long..