function.c (I can't edit this file)
#define FOO 1
#if FOO == 1
void Foo() {}
#endif
cpp
class MyClass
{
#if FOO == 1
void CppFoo()
{
Foo();
}
#endif
}
I want to do the same thing, but without using the define TEST
in the main.cpp file
What I want to do:
class MyClass
{
#if (extern "c" Foo() exist)
void CppFoo()
{
Foo();
}
#endif
}
The CppFoo()
method will not have to be declared if the static function Foo()
has not been declared.
How can I do this?