[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 Thu, Nov 29, 2001 at 11:48:09PM +0100, Peter Aagaard Kristensen wrote:
> Hej CProg
> Jeg har et c++ program som bruger stl. Det vil jeg gerne compile med gcc da 
> jeg skal linke det sammen med nogle gcc objektfiler.
Man kan ikke oversaette c++ programmer med gcc... Der bruger man g++.
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). Det eneste du skal vaere
opmaerksom paa er at de funktioner du bruger fra c-objectfilerne skal
erklaeres inde i flg. konstruktion:

extern "C" {
  Erklaeringer af C funktioner...
}

Paa den maade ved g++ at den ikke skal mangle navnene for de funktioner.

-- 
/-----------------------------------------------------\
| 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] *