⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subject_27423.htm

📁 一些关于vc的问答
💻 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&nbsp;&nbsp;: DMM.C<BR> * Revision : 1.0<BR> * Date&nbsp;&nbsp;: 06-20-1991&nbsp;&nbsp;Axiom Tec. Co., Ltd.<BR> *<BR> * This demo program perform measuring voltage with HP3478 DMM.<BR> *&nbsp;&nbsp;which address is 23 .<BR> */<BR> <BR>#include &lt;stdlib.h&gt;<BR>#include &lt;stdio.h&gt;<BR>#include &lt;conio.h&gt;<BR>#include&nbsp;&nbsp;&nbsp;&nbsp;&lt;string.h&gt;<BR>extern "C"{<BR>int&nbsp;&nbsp;ibinit(int, int, int);<BR>int&nbsp;&nbsp;ibwrt(int, char*, unsigned int);<BR>int&nbsp;&nbsp;ibrd(int, char*, unsigned int);<BR>int&nbsp;&nbsp;ibifc();<BR>int&nbsp;&nbsp;ibeol(int, int, char *, int, int, int);<BR>int&nbsp;&nbsp;ibdclr(int);<BR>int&nbsp;&nbsp;ibllo();<BR>int&nbsp;&nbsp;iblocal(int);<BR>int&nbsp;&nbsp;ibppl();<BR>int&nbsp;&nbsp;ibpplc(int, int);<BR>int&nbsp;&nbsp;ibpplu(int);<BR>int&nbsp;&nbsp;ibren(int);<BR>int&nbsp;&nbsp;ibcmd(char *, unsigned int);<BR>int&nbsp;&nbsp;ibspl(int);<BR>int&nbsp;&nbsp;ibsts(int);<BR>int&nbsp;&nbsp;ibtout(unsigned int);<BR>int&nbsp;&nbsp;ibtrg(int);<BR>}<BR>int&nbsp;&nbsp;main()<BR>{<BR> <BR>&nbsp;&nbsp;char&nbsp;&nbsp;*wrtstr,rdstr[80];<BR>&nbsp;&nbsp;int&nbsp;&nbsp;ioport, myaddr, config, hp3478, flag,i,j;<BR> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* ----- Initialization ----- */<BR> hp3478 = 23;&nbsp;&nbsp; /* hp3478 gpib address&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/<BR> ioport = 0x2e1;&nbsp;&nbsp; /* ax5488 io port&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/<BR> myaddr = 21;&nbsp;&nbsp; /* system controller address */<BR> config = 0x100;&nbsp;&nbsp; /* system configure&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/<BR> flag=ibinit(ioport, myaddr, config);<BR> printf("Firmware segment = %4x \n",flag);<BR> if (flag == 0) {&nbsp;&nbsp; /* flag = 0 : no ax5488 */<BR>&nbsp;&nbsp;&nbsp;&nbsp;printf("***** ax5488 not found *****\n");<BR>&nbsp;&nbsp;&nbsp;&nbsp;exit(0);<BR> }<BR> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* ----- setup timeout interval ----- */<BR> flag=ibtout(50000);&nbsp;&nbsp; /* set time out */<BR> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* ----- interface clear ----- */<BR> ibifc();&nbsp;&nbsp;&nbsp;&nbsp;/* interface bus clear */<BR> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* ----- write control string to device ----- */<BR> wrtstr="F1T3RAN3";&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;&nbsp;Set the HP3478&nbsp;&nbsp;*/<BR> flag=ibwrt(hp3478,wrtstr,strlen(wrtstr));&nbsp;&nbsp; /* write command string to HP3478 */<BR> if (flag != 0) printf("write string failure, flag=%x\n", flag);<BR> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* ----- remote enable ----- */<BR> flag=ibren(hp3478);<BR> if (flag != 0) printf("remote enable error, flag=%x", flag);<BR> rdstr[20]=0;<BR> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*&nbsp;&nbsp;Measurement start&nbsp;&nbsp; */<BR> do {<BR>&nbsp;&nbsp; /* ----- trigger device ----- */<BR>&nbsp;&nbsp;&nbsp;&nbsp;flag=ibtrg(hp3478);&nbsp;&nbsp; /*&nbsp;&nbsp; Trigger the DVM. */<BR>&nbsp;&nbsp;&nbsp;&nbsp;if (flag != 0) printf("\ntrig flag=%x",flag);<BR> <BR>&nbsp;&nbsp; /* ----- serial poll devide ----- */<BR>&nbsp;&nbsp;&nbsp;&nbsp;while (((j=ibspl(hp3478)) &amp; 0x01) != 0x01) ; /* wait data ready */<BR> <BR>&nbsp;&nbsp; /* ----- read data string from device ----- */<BR>&nbsp;&nbsp;&nbsp;&nbsp;flag=ibrd(hp3478,rdstr,20);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;&nbsp;Enter DVM reading&nbsp;&nbsp;*/<BR>&nbsp;&nbsp;&nbsp;&nbsp;if (flag != 0) printf("\nread HP3478 failure, flag=%x", flag);<BR> <BR>&nbsp;&nbsp; /* ----- display ----- */<BR>&nbsp;&nbsp;&nbsp;&nbsp;printf("\n");<BR>&nbsp;&nbsp;&nbsp;&nbsp;printf("\nMeasurement&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= %8.5f V", atof(rdstr));<BR>&nbsp;&nbsp;&nbsp;&nbsp;printf("\nSerial poll ststus = %2x (hex.)", j);<BR>&nbsp;&nbsp;&nbsp;&nbsp;printf("\n*** press any key to measure again, &lt;ESC&gt; to exit ***");<BR>&nbsp;&nbsp;&nbsp;&nbsp;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 + -