Re: global variables in extern c++-functions

From: Joachim Schimpf <j.schimpf_at_icparc.ic.ac.uk>
Date: Wed 11 Dec 2002 01:49:32 PM GMT
Message-ID: <3DF7426C.5B0F5935@icparc.ic.ac.uk>
Georg Fette wrote:
> 
> Hiho,
> When I link some external c++-functions in my eclipse-program, may I use
> global c++-variables in my c++-functions (so some functions may share those,
> when they get called later) or do the global variables get destroyed after
> the messageflow returns from c++ to eclipse ?

Global variables are a bad idea in any language, so don't do it.

Instead, pass information as arguments. If you want to pass
C++ data via Eclipse, read the manual section

Embedding and Interfacing Manual 
 Managing Data and Memory in Mixed-Language Applications
  Passing generic C or C++ data to ECLiPSe 


-- 
 Joachim Schimpf              /             phone: +44 20 7594 8187
 IC-Parc, Imperial College   /            mailto:J.Schimpf@ic.ac.uk
 London SW7 2AZ, UK         /    http://www.icparc.ic.ac.uk/eclipse
Received on Wed Dec 11 13:52:22 2002

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:19 PM GMT GMT