Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2341611
  • 博文数量: 816
  • 博客积分: 10000
  • 博客等级: 上将
  • 技术积分: 5010
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-17 17:57
文章分类

全部博文(816)

文章存档

2011年(1)

2008年(815)

分类:

2008-12-17 18:05:54

小弟菜鳥一名,第一次使用DLL文件.

已經聲名了:
extern "C" _declspec(dllimport) int W_730_Initial(int card_number,int base_address);
extern "C" _declspec(dllimport) int W_730_Set_Card(int card_number);
extern "C" _declspec(dllimport) int W_730_Get_Card(int card_number);
extern "C" _declspec(dllimport) int W_730_DI_Channel(int channel_no,unsigned int *di_data);
extern "C" _declspec(dllimport) int W_730_DI_16(int port,unsigned int *di_data);
extern "C" _declspec(dllimport) int W_730_DI_8(int byte_no,unsigned char *di_data);
extern "C" _declspec(dllimport) int W_730_DO_Channel(int channel_no,unsigned char do_data);
extern "C" _declspec(dllimport) int W_730_DO_16(int port,unsigned int do_data);
extern "C" _declspec(dllimport) int W_730_DO_8(int byte_no,unsigned char *do_data);
extern "C" _declspec(dllimport) int W_730_Read_Back(int byte_no,unsigned char *do_data);

也添加了LIB文件.

使用W_730_DI_16:
String inputdata;
inputdata = W_730_DI_16(1,0);

提示連接錯誤:
[Linker Error] Unresolved external '_W_730_DI_16' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\PROJECTS\TESTIO\UNIT1.OBJ

--------------------next---------------------

阅读(1081) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~