以前ywindows下DPI怎么实现?
时间:10-02
整理:3721RD
点击:
以前用过PLI都是用一个.bat文件生成DLL,LIB文件。
今天看了DPI,想用同样的方法实现:采用的是VC6的命令cl和link
cl -c -I C:\QuestaSim_6.3c\include foreign.c
C:\"rogram Files"\"Microsoft Visual Studio"\VC98\Bin\link -dll foreign.obj -export:c_CarWaiting C:\QuestaSim_6.3c\win32\mtipli.lib -out:foreign.dll
(以前PLI生成时是-export:veriusertfs,-export:vlog_startup_routines,这里不知道是不是函数名)
看了安装目录中的doc文件说明,费解中!
foreign.c内容:
#include "dpi_types.h"
int c_CarWaiting()
{
printf("There's a car waiting on the other side. \n");
printf("Initiate change sequence ...\n");
sv_YellowLight();
sv_WaitForRed();
sv_RedLight();
return 0;
}
结果编译能通过,链接出错不能生成DLL文件! :Q :Q :Q
错误是不能识别
sv_YellowLight();
sv_WaitForRed();
sv_RedLight();
这三个函数!
大侠帮忙解个惑!
今天看了DPI,想用同样的方法实现:采用的是VC6的命令cl和link
cl -c -I C:\QuestaSim_6.3c\include foreign.c
C:\"rogram Files"\"Microsoft Visual Studio"\VC98\Bin\link -dll foreign.obj -export:c_CarWaiting C:\QuestaSim_6.3c\win32\mtipli.lib -out:foreign.dll
(以前PLI生成时是-export:veriusertfs,-export:vlog_startup_routines,这里不知道是不是函数名)
看了安装目录中的doc文件说明,费解中!
foreign.c内容:
#include "dpi_types.h"
int c_CarWaiting()
{
printf("There's a car waiting on the other side. \n");
printf("Initiate change sequence ...\n");
sv_YellowLight();
sv_WaitForRed();
sv_RedLight();
return 0;
}
结果编译能通过,链接出错不能生成DLL文件! :Q :Q :Q
错误是不能识别
sv_YellowLight();
sv_WaitForRed();
sv_RedLight();
这三个函数!
大侠帮忙解个惑!
