I have a simple callout library:
#define ZF_DLL
#include
#include
#undef ERROR
int GetRandom(double* random) {
// Py_Initialize();
// Py_Finalize();
*random = 1.0;
return ZF_SUCCESS;
}
int main(int argc, char **argv)
{
printf("Random: ");
double random=0;
GetRandom(&random);
printf("%lf", random);
return 0;
}
ZFBEGIN
ZFENTRY("GetRandom","D",GetRandom)
ZFEND
I compile this code as a shared library and it works fine with:
.png)
.png)
