At Thu, 24 May 2007 20:07:13 +0200 Bernd Strieder <[EMAIL PROTECTED]> wrote:

> 
> Hello,
> 
> Robert Heller wrote:
> 
> > At Thu, 24 May 2007 15:08:26 GMT Jim Anderson <[EMAIL PROTECTED]> wrote:
> 
> > 
> > gcc can link C++ code, but you need to give it a 'hint' that you are
> > in fact linking C++ code, usually by including the -l option(s) that
> > g++ would normally add:
> > 
> > gcc -g -o test test.o Product.o DerivedProduct.o Creator.o \
> > DerivedCreator.o -lstdc++ -lc++
> 
> That is usually not enough, the linker might need special options, there
> are linking passes special to C++, special startup code might be
> necessary and more, all differing between platforms and compiler
> releases. Just use g++, it has been working the same way for a long
> time, and almost everywhere.

True, my point is that with some effort, it is possible to link a C++
program with gcc.  OTOH, it is NOT a recomended practice...

> 
>        

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Linux Installation and Administration
http://www.deepsoft.com/  -- Web Hosting, with CGI and Database
[EMAIL PROTECTED]       -- Contract Programming: C/C++, Tcl/Tk
                                                                                
                                               
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to