- move the extern "C" declaration of module_init into main.h so that it
will affect all modules. - modified: main.h module1.cc
This commit is contained in:
parent
53ceefc3c7
commit
0699e46993
@ -19,3 +19,7 @@ typedef void (*modload_func)(void);
|
||||
MAINAPI(extern const char *) version_string;
|
||||
MAINAPI(extern int) register_module (const char *name);
|
||||
|
||||
extern "C" {
|
||||
// this prevents C++ name mangling
|
||||
void module_init ();
|
||||
};
|
||||
|
@ -1,11 +1,6 @@
|
||||
#include <stdio.h>
|
||||
#include "main.h"
|
||||
|
||||
extern "C" {
|
||||
// prevent C++ name mangling
|
||||
void module_init();
|
||||
};
|
||||
|
||||
void module_init ()
|
||||
{
|
||||
printf ("module1 init\n");
|
||||
|
Loading…
Reference in New Issue
Block a user