- pexports -o lua5.1.dll >lua5.1.def
dlltool -D lua5.1.dll -l lua5.1.a -d lua5.1.def -
#include < stdio.h >
#include < malloc.h >
#include < assert.h >
typedef void (__stdcall * func_call)();
void __stdcallfoo( int a, int b)
... {
printf("%d,%d ",a,b);
}
void check( void * arg)
... {
assert((void**)arg-&arg==1);
}
void test()
... {
int*arg=(int*)_alloca(2*sizeof(int));
arg[0]=1;
arg[1]=2;
check(arg);
((func_call)foo)();
}
void main()
... {
test();
}
MinGw 生成Dll的连接库 无参数调用
最新推荐文章于 2023-09-01 16:12:25 发布