首页 > cl编译得到的dll无法通过rundll32.exe调用

cl编译得到的dll无法通过rundll32.exe调用

源程序(两个):

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>

如何解决?

【热门文章】
【热门文章】