collect2.exe: error: ld returned 1 exit status 问题解释 程序本身应该是没错的,ld是链接错误 这种问题一般是使用了c语言的编译器来编译c++文件造成的, 可以将main.cpp修改为main.c试试 multiple definition of xxxx问题解决及其原理 http://blog.csdn.net/mantis_1984/article/details/53571758