Your file is not a program at all! It is a collection of subprograms. You cannot compile it for running as a program, only as an object file or a library (try -c or -shared). You must add the main program body to be able to compile it as a program and run it!