AT>>> extern unsigned _stklen = 10000;
BP>> In C++ it probably must be declared as extern "C" unsigned ...
MB> extern "C" makes only sense with functions.
Some compilers generate mangled names for variables, too. Try this with and
without TEST defined:
================ Begin G.H ===============
#ifdef TEST
#ifdef __cplusplus
extern "C" {
#endif
#endif
extern const char *global_string;
#ifdef TEST
#ifdef __cplusplus
}
#endif
#endif
================ End G.H ===============
================ Begin G.Cpp ===============
#include "g.h"
const char *global_string = "string";
================ End G.Cpp ===============
================ Begin Test.C ===============
#include
#include "g.h"
int main (void)
{
printf ("global_string = %s\n", global_string);
return 0;
}
================ End Test.C ===============
// Albert email: jla@to.icl.fi
--- GoldED/2 2.50+
---------------
* Origin: Albert's Point/2 in Finland, Europe (2:221/360.20)
|