C++ question

Joel Sherrill joel.sherrill at OARcorp.com
Thu May 25 14:00:48 UTC 2000


Alexey wrote:
> 
> Hi.
> Did any one face with following problem (if it's realy problem) ?
> If I took "hello world" sample, re-name it from test.c to test.cc and
> re-place
> printf to cout it build test.o with g++ but try to link it to executable
> file with gcc - the resul will be :
> undefined reference to cout
> undefined reference to ostream::operator <<(char const *)
> I can fix it in target.cfg
> CC=g++ instead of gcc, but is there another way to solve it?

Look at the samples/cdtest.  It gets by this as follows:

LD_LIBS += $(CPLUS_LD_LIBS)

> Regards,
> Alexey

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985



More information about the users mailing list