Changes between Version 4 and Version 5 of TBR/UserManual/Using_C_Plus_Plus


Ignore:
Timestamp:
06/22/07 03:39:22 (15 years ago)
Author:
ChrisJohns
Comment:

Comments from Ralf's email added.

Legend:

Unmodified
Added
Removed
Modified
  • TBR/UserManual/Using_C_Plus_Plus

    v4 v5  
    2424
    2525C++ programs need to link to the standard C++ library (<tt>libstd++.c</tt>) and the C++ front-end ('''g++''') is required to perform the linking task. Do not add '''-lstd++''' to the command line of '''gcc''', '''ld''' or a '''specs''' file.
     26
     27The rationale is quite simple: Linking c++ is more than "just adding a library". G++ reflects this thought and treats libstdc++ as an internal implementation detail users do not need to know about or touch.
     28
     29On some targets/with some compilers "linking c++" is effectively "just adding -lstdc++" but on most others it is more. What confuses some users is "gcc ... -lstdc++" once having been worked with old gcc (IIRC, gcc < 4.0) on i386 targets.
    2630= Global Object Construction and Destruction =
    2731