2011年9月15日 - Try. g++ -Wall -o ex_addinst ex_addinst.c. instead of. g++ -Wall -o ex_addinst ex_addinst.o. You want to compile the .c file, not the .o file.
stackoverflow.com