Posted by po-boy on July 26, 2001 at 16:54:18:
In Reply to: Project Three Errors posted by Joe on July 26, 2001 at 16:42:33:
I also got the same errors in vc++;
I did find one error with test.cpp (line 87) testNumber should be testNum.
Working in g++ I received other strange linker errors. Has anyone else ran into the same problem?
/tmp/ccmBA7M8.o: In function `foo::count(void)':
/tmp/ccmBA7M8.o(.foo::gnu.linkonce.t.count(void)+0x5): undefined reference to `f
oo::existence_counter'
/tmp/ccmBA7M8.o: In function `foostring::foostring(void)':
/tmp/ccmBA7M8.o(.foostring::gnu.linkonce.t.(void)+0xf): undefined reference to `
foo::foo(void)'
/tmp/ccmBA7M8.o(.foostring::gnu.linkonce.t.(void)+0x5a): undefined reference to
`foo::~foo(void)'
/tmp/ccmBA7M8.o: In function `foostring::foostring(foostring const &)':
/tmp/ccmBA7M8.o(.foostring::gnu.linkonce.t.(foostring const &)+0x13): undefined
reference to `foo::foo(void)'
/tmp/ccmBA7M8.o(.foostring::gnu.linkonce.t.(foostring const &)+0x67): undefined
reference to `foo::~foo(void)'
/tmp/ccmBA7M8.o: In function `foostring::~foostring(void)':
/tmp/ccmBA7M8.o(.gnu.linkonce.t._._9foostring+0x25): undefined reference to `foo
::~foo(void)'
/tmp/ccmBA7M8.o: In function `fooint::~fooint(void)':
/tmp/ccmBA7M8.o(.gnu.linkonce.t._._6fooint+0x14): undefined reference to `foo::~
foo(void)'
/tmp/ccmBA7M8.o: In function `fooint::fooint(int)':
/tmp/ccmBA7M8.o(.fooint::gnu.linkonce.t.(int)+0x13): undefined reference to `foo
::foo(void)'
/tmp/ccmBA7M8.o(.fooint::gnu.linkonce.t.(int)+0x37): undefined reference to `foo
::~foo(void)'
/tmp/ccmBA7M8.o: In function `fooint::fooint(fooint const &)':
/tmp/ccmBA7M8.o(.fooint::gnu.linkonce.t.(fooint const &)+0x13): undefined refere
nce to `foo::foo(void)'
/tmp/ccmBA7M8.o(.fooint::gnu.linkonce.t.(fooint const &)+0x37): undefined refere
nce to `foo::~foo(void)'
collect2: ld returned 1 exit status