源程序(两个):
test.def:
EXPORTS add
test.c:
#include <stdio.h>
extern int add(){
printf("hello world\n");
return 0;
}
编译
cl test.c test.def /LD
运行
rundll32 test.dll,add
但并没有printf我所期待的结果:
C:\Users\zh199\Documents\Z_Sth\c>rundll32 test.dll,add
C:\Users\zh199\Documents\Z_Sth\c>
如何解决?