compile 個 .so 同個 test
g++ -shared -I../../C/FreeImage/Dist dyncall.cpp libfreeimage.a -o dyncall.so
gcc -O3 testcall.cpp dyncall.so -o testcall
-------------
dyncall.cpp
#include <stdio.h>
#include <FreeImage.h>
int dyncall();
main()
{
dyncall();
}
int dyncall()
{
bool fBigEndian;
fprintf(stderr,"test 1 : start\n");
fBigEndian = !FreeImage_IsLittleEndian();
FreeImage_Initialise();
fprintf(stderr,"test 2 : end\n");
}
calltest.cpp
#include <stdio.h>
int dyncall();
main()
{
dyncall();
}
沒有留言:
張貼留言