delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/01/12:35:46

From: "Eyal Ben-David"<Eyal_Ben-David AT aks DOT com>
To: ma6djh AT bath DOT ac DOT uk
cc: djgpp AT delorie DOT com
Message-ID: <C225648A.0058F9FD.00@aks.com>
Date: Thu, 1 May 1997 19:17:54 +0300
Subject: Re: C++ and Assembler
Mime-Version: 1.0



Hello.

If you want to call a C  function from a C++ module you will have to use
the extern "C" mechanism

 for example:

 extern "C"  int printf(const char* str, ...);

if you want to use more than one function you can write also:

extern "C" {
   int  func1();
   int  func2();
   // ...
}

If you have the time, read header files you can learn a lot.

Eyal.


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019