Fix c++ linking problem in example 'variables'.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/oliverb-javascript-v8@13814 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Oliver Buchtala 2012-09-08 01:12:46 +00:00
commit a82e0a6e8f

View file

@ -23,7 +23,12 @@ char cvar = 0;
float fvar = 0;
double dvar = 0;
char *strvar = 0;
const char cstrvar[] = "Goodbye";
#ifdef __cplusplus // Note: for v8 this must be linkable with g++, without extern cstrvar is mangled
extern const char cstrvar[] = "Goodbye";
#else
const char cstrvar[] = "Goodbye";
#endif
const
int *iptrvar = 0;
char name[256] = "Dave";
char path[256] = "/home/beazley";