I have read the other answers on this topic, and unfortunately they have not helped me. I am attempting to link several c programs together, and I am getting an error in respons
You should provide output file name after -o option. In your case runexp.o is treated as output file name, not input object file and thus your main function is undefined.