The code compiled OK out of the box, so it must be a problem with the .cbp file you did not post.
I have reformatted the code a little (added guards, reordered struct declarations and declared square_matrix_create() in the .h). The .cbp file is included, so you can open it and compile.