📄 subject_27423.htm
字号:
<p>
序号:27423 发表者:DM 发表日期:2003-01-11 13:28:56
<br>主题:Linking...fatal error LNK1136 ???? Help !!!
<br>内容: Linking...fatal error LNK1136 ???? Help !!!<BR>用vc6.0 调用c 编写lib (itf488cs.lib)出现link Error 请各位帮帮忙..谢谢!!<BR>Linking...<BR>itf488cs.lib : fatal error LNK1136: invalid or corrupt file<BR>Error executing link.exe.<BR><BR><BR>/* Program : DMM.C<BR> * Revision : 1.0<BR> * Date : 06-20-1991 Axiom Tec. Co., Ltd.<BR> *<BR> * This demo program perform measuring voltage with HP3478 DMM.<BR> * which address is 23 .<BR> */<BR> <BR>#include <stdlib.h><BR>#include <stdio.h><BR>#include <conio.h><BR>#include <string.h><BR>extern "C"{<BR>int ibinit(int, int, int);<BR>int ibwrt(int, char*, unsigned int);<BR>int ibrd(int, char*, unsigned int);<BR>int ibifc();<BR>int ibeol(int, int, char *, int, int, int);<BR>int ibdclr(int);<BR>int ibllo();<BR>int iblocal(int);<BR>int ibppl();<BR>int ibpplc(int, int);<BR>int ibpplu(int);<BR>int ibren(int);<BR>int ibcmd(char *, unsigned int);<BR>int ibspl(int);<BR>int ibsts(int);<BR>int ibtout(unsigned int);<BR>int ibtrg(int);<BR>}<BR>int main()<BR>{<BR> <BR> char *wrtstr,rdstr[80];<BR> int ioport, myaddr, config, hp3478, flag,i,j;<BR> <BR> /* ----- Initialization ----- */<BR> hp3478 = 23; /* hp3478 gpib address */<BR> ioport = 0x2e1; /* ax5488 io port */<BR> myaddr = 21; /* system controller address */<BR> config = 0x100; /* system configure */<BR> flag=ibinit(ioport, myaddr, config);<BR> printf("Firmware segment = %4x \n",flag);<BR> if (flag == 0) { /* flag = 0 : no ax5488 */<BR> printf("***** ax5488 not found *****\n");<BR> exit(0);<BR> }<BR> <BR> /* ----- setup timeout interval ----- */<BR> flag=ibtout(50000); /* set time out */<BR> <BR> /* ----- interface clear ----- */<BR> ibifc(); /* interface bus clear */<BR> <BR> /* ----- write control string to device ----- */<BR> wrtstr="F1T3RAN3"; /* Set the HP3478 */<BR> flag=ibwrt(hp3478,wrtstr,strlen(wrtstr)); /* write command string to HP3478 */<BR> if (flag != 0) printf("write string failure, flag=%x\n", flag);<BR> <BR> /* ----- remote enable ----- */<BR> flag=ibren(hp3478);<BR> if (flag != 0) printf("remote enable error, flag=%x", flag);<BR> rdstr[20]=0;<BR> <BR> /* Measurement start */<BR> do {<BR> /* ----- trigger device ----- */<BR> flag=ibtrg(hp3478); /* Trigger the DVM. */<BR> if (flag != 0) printf("\ntrig flag=%x",flag);<BR> <BR> /* ----- serial poll devide ----- */<BR> while (((j=ibspl(hp3478)) & 0x01) != 0x01) ; /* wait data ready */<BR> <BR> /* ----- read data string from device ----- */<BR> flag=ibrd(hp3478,rdstr,20); /* Enter DVM reading */<BR> if (flag != 0) printf("\nread HP3478 failure, flag=%x", flag);<BR> <BR> /* ----- display ----- */<BR> printf("\n");<BR> printf("\nMeasurement = %8.5f V", atof(rdstr));<BR> printf("\nSerial poll ststus = %2x (hex.)", j);<BR> printf("\n*** press any key to measure again, <ESC> to exit ***");<BR> j=0;<BR> } while (getch() != 27);<BR> return 0;<BR>}<BR><BR>
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:songxinye 回复日期:2003-01-11 13:38:32
<br>内容:重新编译itf488cs.lib并加入到当前工程当中<BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:DM 回复日期:2003-01-11 13:56:50
<br>内容:Dear songyas .<BR>谢谢您的回复 <BR>对不起,我忘了告诉大家itf488cs.lib是厂商提供的正确库。我是在工程已在setting General中设好itf488cs.lib.且设好路径,仍不行,且<BR>也试过直接将itf488cs.lib加入到当前工程当中.也不行.是否我的lib设置方法有误,请不吝赐教.谢谢!!!!!!!<BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -