mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-18 19:03:45 +00:00
Estimated hours taken: 0.25 samples/c_interface/mercury_calls_cplusplus/*: Add an example of Mercury calling C++ code.
15 lines
286 B
C
15 lines
286 B
C
/*
|
|
** Function prototype for the cpp_main() function defined in cpp_main.c.
|
|
** Note: this is a C++ function, but it needs to be declared as
|
|
** extern "C" so that it can be called from Mercury.
|
|
*/
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
void cpp_main(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|