[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] gcc og c++ stl



On Fri, Nov 30, 2001 at 12:18:46PM +0100, Peter Aagaard Kristensen wrote:
> At 09:55 30-11-2001 +0100, Klaus Madsen wrote:
>  >Man kan ikke oversaette c++ programmer med gcc...
> Det kan jeg nu godt
Ja, men det er ikke paent at goere.

>  >Men du kan let linke filer der er kommet ud at en oversaettelse med gcc
>  >sammen med et c++ program, ved at give dem som argumenter paa
>  >kommandolinien (det skal vaere .o filen).
> Så vidt jeg ved kan gcc og g++ generede objektfiler ikke linkes sammen
Kan du ikke bruge glibc sammen med dit C++ program? Eller hvad med
libX11? 

Selvfoelgelig kan man linke C og C++ objekt filer sammen (eller
assembler-objektfiler og C++). Det er klart lettest at linke en
C-objektfil sammen med et C++ program, men det omvendte kan ogsaa lade
sig goere. Det eneste man skal huske, er at de funktioner som bliver
importeret fra C skal erklaeres som extern "C" i dit C++ program.

-- 
/-----------------------------------------------------\
| Klaus S. Madsen      | "Failure is not an option... |
| ICQ: 45400164        |  It comes bundled with your  |
| www.hjernemadsen.org |  Microsoft products!"        |
\-----------------------------------------------------/


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:09 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *