[prog] C++ loader error

Ganesh Swami ganesh at rapidtech.bc.ca
Fri May 30 23:01:43 EST 2003


On Fri, 30 May 2003 09:35:44 -0500 (CDT)
"Kathryn Hogg" <kjh at flyballdogs.com> wrote:

> Ganesh Swami said:
> > You do not need to call ld directly from your make file, you can let
> > gcc call the linker.
> >
> > Linking statement:
> > gcc -o firm <list of all object files>
> 
> Some you are linking C++ code use g++ instead of gcc to link your
> program as this will arrange for the C++ library to be automatically
> linked and some other important C++ bookkeeping.
 
Yes Kathryn, you are right.

BTW, if you _still_ want to use gcc, add -lstdc++ to that line. -lstdc++
links the file libstdc++.a, and its the standard C++ library, but I
don't have to tell you that. ;)

regards,
Ganesh


-- 
Ganesh Himself:
http://www.sfu.ca/~gswamina/



More information about the Programming mailing list