我要编译一个多文件C++程序,出现以下错误;
Undefined symbols for architecture i386:
"included::printMSG()", referenced from:
_main in ccQwMj1l.o
ld: symbol(s) not[Finished in 0.3s with exit code 1] found for architecture i386
collect2: ld returned 1 exit status
我的代码:main.cpp:https ://gist.github.com/3845822
包含的.cpp:https ://gist.github.com/3845825
包括.h:https ://gist.github.com/3845827
(确认与 合作g++
)
编辑:我没有把这些文件放在一个项目中,它们都在同一个文件夹中,我正在编译main.cpp