Why is this working: Compiler question related to opengl tutor code.

I was playing around with the Nate Robbins opengl code today and particularly the transformation code. When I tried to use this code in code blocks it was giving me some problems, like unidentified references to functions already declared in the glm.h file and the glm.c file.
I initially attached my glm.c to my project folder but this still wouldn’t compile. In the end I copied all the contents of the glm.c file and put them into a 2nd header file, Jglm.h and included it main file and everything is working fine.

What I want to know is why was this given as a .c file in the first place, is there a reason for this?
, Im assuming its "supposed" to compile as my .cpp linking to the .c file or I was just doing something else wrong.
Is it a good idea to make it a header file, will doing something like this cause me problems later on, and is it bad coding practice?

Projects are often (when you get to things of this size, let's go with "always") in multiple source code files. All of your source code files must be in your project for your project to build successfully.

What folder things are in is pretty irrelevant. Actually putting the source code in the project itself is the important part. In Code::Blocks, right-click on the name of your project (over on the left-side window, under Workspace), click Add Files, and add the source files to your project.