I just have a few questions about gcc's linker, ld: if I have multiple c++
files, (say "class.cc, class.h, and main.cc), and all #include directives
are in their proper places, is there anything I need to do besides "g++
main.cc"? With a container class that I made for a class assignment,
here's the linker output I got:
-----------------------------------
/tmp/ccP5jlPc.o(.text+0x19): In function `main':
: undefined reference to `mycontainer::mycontainer[in-charge]()'
/tmp/ccP5jlPc.o(.text+0x48): In function `main':
: undefined reference to `mycontainer::add(int)'
/tmp/ccP5jlPc.o(.text+0x73): In function `main':
: undefined reference to `mycontainer::~mycontainer [in-charge]()'
/tmp/ccP5jlPc.o(.text+0x8a): In function `main':
: undefined reference to `mycontainer::~mycontainer [in-charge]()'
collect2: ld returned 1 exit status
-----------------------------------
Thanks!
-Brendan Bond <brend...@austin.rr.com>