Undefined symbols for architecture i386:
问题 I've recently moved over to a mac, and am struggling using the command line compilers. I'm using g++ to compile, and this builds a single source file fine. if I try to add a custom header file, when I try to compile using g++ I get undefined symbols for architecture i386. The programs compile fine in xCode however. Am I missing something obvious? tried using g++ -m32 main.cpp... didn't know what else to try. Okay, The old code compiled... Have narrowed it down to my constructors. class Matrix