This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: libstdc++ linking problem


Hi,

That didnt work.

Earlier while build i removed the -F option for gperf. since my version
of gperf does not support that option. Instead i have used -f
option. maybe this problem occurs since the hashing function to find
libraries is not correct(using gperf)..
Please help with any info regarding gperf and libraries(stdc++)

Thanks,
sathyas

-----------------------------------------------------------------------
  Sathyanarayanan S,
  Software Engineer,
  Sankhya Technologies Pvt Ltd, 
  #79,'dwaraka',First floor,
  Nungambakkam high road,
  Chennai-34.
  www.sankhya.com
  TEL: (91)-O44-8227358


On Wed, 1 May 2002, William A. Gatliff wrote:

> Sathya:
> 
> 
> Add a "using namespace std;" to the top of your test.cc.
> 
> b.g.
> 
> On Wed, May 01, 2002 at 11:07:46AM +0530, S Sathyanarayanan wrote:
> > Hi,
> > 
> >  I am not able to successfully link my helloworld program(test.cc) using
> >  mips-elf-ld. I'm using mips-elf-g++ for compile. 
> >  The gcc build was successfull with newlib. 
> > 
> >  The linker is not able to link the *.o files in the archive file(stdc++)
> >  I have tried the -lstdc++ -L<dir>, but the linker is not able to get
> >  definitions from libstdc++. Also, i have tried with libgcc.a and libc.a
> > 
> >  The following error is got,
> > mips-elf-g++ -c -EB -I/home/sathyas/yamon_appl/include -DEB -o test.o test.cc
> > mips-elf-g++ -c -EB -I/home/sathyas/yamon_appl/include -DEB -o start.o start.S
> > mips-elf-ld -T ./link.xn -o appl.elf -Map appl.map test.o start.o
> > test.o: In function `main':
> > test.cc(.text+0x18): undefined reference to `cout'
> > test.cc(.text+0x1c): undefined reference to `cout'
> > test.cc(.text+0x24): undefined reference to `ostream::operator<<(char
> > const *)'
> > make: *** [appl.elf] Error 1
> > 
> > test.cc -sample program
> > start.S -start up code for MIPS Malta board
> > link.xn - Linker script
> > 
> > Please suggest or clarify what is going wrong, I have also set the
> > environment variables LD_LIBRARY_PATH and GCC_EXEC_PREFIX
> > 
> > Thanks,
> > sathya
> > 
> > 
> > ------
> > Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
> > Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
> > 
> 
> -- 
> Bill Gatliff
> bgat@billgatliff.com
> 
> ------
> Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
> 


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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