This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: operator<< overload question


Allen Wayne Best <gcc@atoka-software.com> writes:

> g++  -g -O2   -o motor  motor.o sensor.o  
> motor.o(.text+0x7cd): In function `main':
> /home/best/engine-project/control-module/project/src/motor.cpp:67: undefined 
> reference to `Measure::operator<<(std::basic_ostream<char, 
> std::char_traits<char> >&, Measure::Sensor const&)'
> collect2: ld returned 1 exit status
> 
> any suggestions are greatly appreciated! tia!

I suggest that you put together a complete test case in a single file,
rather than using piece-meal bits.  You haven't provided enough
information to show what has gone wrong.

In particular, the error message refers to Measure, which was not in
your sample code at all, but may be an important part of the problem.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]