declare CCFS instance as extern in header file

This commit is contained in:
Josh Holtrop 2012-09-07 23:26:37 -04:00
parent aead49d6de
commit 99a9e2b67f

View File

@ -91,7 +91,9 @@ const unsigned char *CCFSClass::get_file(const char *fname, unsigned int *length
} }
return NULL; return NULL;
} }
''')
CCFSClass %s;
''' % (instance_name))
h_file.write('''#ifndef CCFS_GEN_%s h_file.write('''#ifndef CCFS_GEN_%s
#define CCFS_GEN_%s #define CCFS_GEN_%s
@ -101,7 +103,7 @@ public:
const unsigned char *get_file(const char *fname, unsigned int *length); const unsigned char *get_file(const char *fname, unsigned int *length);
}; };
CCFSClass %s; extern CCFSClass %s;
#endif #endif
''' % (cname(header_fname), cname(header_fname), instance_name)) ''' % (cname(header_fname), cname(header_fname), instance_name))