您的位置:控制工程论坛网论坛 » 传感器 » tc++3.0编译5510程序的make问题

liubingrui

liubingrui   |   当前状态:离线

总积分:1915  2025年可用积分:0

注册时间: 2007-08-10

最后登录时间: 2010-12-09

空间 发短消息加为好友

tc++3.0编译5510程序的make问题

liubingrui  发表于 2008/9/17 21:24:58      616 查看 0 回复  [上一主题]  [下一主题]

手机阅读

  我用组态王做上位机,5510M的控制器,slot0:adam5017,
                                     slot1: adam5060
程序如下:
 #include "mrtu.h"
 #include "5510drv.h"
 #include "conio.h"
 void main()
 { 
 int result;
 char c;
 int ch;
 int *out;
 
 /*------first scan IO module-------*/
 Init501718(0);
 SetCom1ToPC(9600L,8,0,1);
 SetCom2ToPC(9600L,8,0,1);
 ch=0;
 while(1)
 {
 /*----------Check whether the AI data  of the slot 0 is ready------*/
 if(AiUpdate(0,&ch)==0)
{
 /*--AI is ready,then return current channel index--*/
 /*--Get one channel data-- */
 /*--The data format of AI value is a signed engineering unit.--*/
 Get501718(0,ch,&result);
 SetWordIn(ch+1,result);
}
 GetBitOut(1,out);
 Set5060(out,2,0,ABit);
 ProReqCom1();
 ProReqCom2();
  }
  }
这部分是用组态王6.51盘里头的demo程序改的~~~,compile成功,但是没有想到出现link的错误:

 Linking QXC01.EXE:                                                           │
│?Linker Error: Undefined symbol _main in module c0.ASM   


编译器是broland的 tc++ 3.0,
adam的工作模式选择是small,cpu类型也是80168,link settings里面为standard exe(组态王里头写的是standard dos exe,但是tc++3.0里面只有stadnard exe)

请问是怎么回事???或者如何解决?? 
1楼 0 0 回复