I have created .so file for following function:
main.cpp:
#include<stdio.h>
#include "test.h"
int main()
{
int a=hello();
printf("%d",a);
return 0;
}
test.h
int test()
{
int a=5,b=10,c;
printf("Hi");
c=a+b;
return c;
}
Now I create shared library file main.so for above program and want to call hell() function from php script.
p1.php
<?php
// Call to test function in main.cpp
>
I saw various tutorials on web but no clear explaination. Can someone give link to some tutorial or help me for this prob?