| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1195 人关注过本帖
标题:标准c语言编译问题
取消只看楼主 加入收藏
unix_c
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2016-9-23
收藏
 问题点数:0 回复次数:1 
标准c语言编译问题
linux操作系统,根据MIB库生成一段C语言,raid.c、raid.h两个文件,进行编译,报错,

raid.c内容:
/*
 * Note: this file originally auto-generated by mib2c using
 *        $
 */

#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
#include "lsi.h"

extern const oid snmptrap_oid;
extern const size_t snmptrap_oid_len;

int
                send_adapterTraps
#_trap( void )
{
    netsnmp_variable_list *var_list = NULL;
    const oid       adapterTraps
#_oid[] = { 1,3,6,1,4,1,3582,4,1,6,0 };
        /*
         * Set the snmpTrapOid.0 value
         */
     
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        snmp_varlist_add_variable(&var_list,
                                  snmptrap_oid, snmptrap_oid_len,
                                  ASN_OBJECT_ID, adapterTraps
#_oid, sizeof(adapterTraps#_oid));
                                  /*
                                   * Add any extra (optional) objects here
                                   */
                                  /*
                                   * Send the trap to the list of configured destinations
                                   *  and clean up
                                   */
                                  send_v2trap     (var_list);
                                  snmp_free_varbind(var_list);
                                  return SNMP_ERR_NOERROR;} int
                                  send_vdTraps
#_trap( void )
                                  {
                                  netsnmp_variable_list * var_list = NULL;
                                  const oid vdTraps
#_oid[] = { 1,3,6,1,4,1,3582,4,1,7,0 };
                                  /*
                                   * Set the snmpTrapOid.0 value
                                   */
                                  snmp_varlist_add_variable(&var_list,
                                                            snmptrap_oid,
                                                            snmptrap_oid_len,
                                                            ASN_OBJECT_ID,
                                                            vdTraps
#_oid, sizeof(vdTraps#_oid));
                                                            /*
                                                             * Add any extra (optional) objects here
                                                             */
                                                            /*
                                                             * Send the trap to the list of configured destinations
                                                             *  and clean up
                                                             */
                                                            send_v2trap   
                                                            (var_list);
                                                            snmp_free_varbind
                                                            (var_list);
                                                            return
                                                            SNMP_ERR_NOERROR;}
                                                            int
                                                            send_pdTraps
#_trap( void )
                                                            {
                                                            netsnmp_variable_list
                                                            * var_list =
                                                            NULL;
                                                            const oid
                                                            pdTraps
#_oid[] = { 1,3,6,1,4,1,3582,4,1,8,0 };
                                                            /*
                                                             * Set the snmpTrapOid.0 value
                                                             */
                                                            snmp_varlist_add_variable
                                                            (&var_list,
                                                             snmptrap_oid,
                                                             snmptrap_oid_len,
                                                             ASN_OBJECT_ID,
                                                             pdTraps
#_oid, sizeof(pdTraps#_oid));
                                                             /*
                                                              * Add any extra (optional) objects here
                                                              */
                                                             /*
                                                              * Send the trap to the list of configured destinations
                                                              *  and clean up
                                                              */
                                                             send_v2trap   
                                                              (var_list);
                                                             snmp_free_varbind
                                                             (var_list);
                                                             return
                                                             SNMP_ERR_NOERROR;}
                                                             int
                                                             send_enclTraps
#_trap( void )
                                                             {
                                                             netsnmp_variable_list
                                                             * var_list =
                                                             NULL;
                                                             const oid
                                                             enclTraps
#_oid[] = { 1,3,6,1,4,1,3582,4,1,9,0 };
                                                             /*
                                                              * Set the snmpTrapOid.0 value
                                                              */
                                                             snmp_varlist_add_variable
                                                             (&var_list,
                                                              snmptrap_oid,
                                                              snmptrap_oid_len,
                                                              ASN_OBJECT_ID,
                                                              enclTraps
#_oid, sizeof(enclTraps#_oid));
                                                              /*
                                                               * Add any extra (optional) objects here
                                                               */
                                                              /*
                                                               * Send the trap to the list of configured destinations
                                                               *  and clean up
                                                               */
                                                              send_v2trap  
                                                                (var_list);
                                                              snmp_free_varbind
                                                              (var_list);
                                                              return
                                                              SNMP_ERR_NOERROR;}
                                                              int
                                                              send_pciTraps
#_trap( void )
                                                              {
                                                              netsnmp_variable_list
                                                              * var_list =
                                                              NULL;
                                                              const oid
                                                              pciTraps
#_oid[] = { 1,3,6,1,4,1,3582,4,1,10,0 };
                                                              /*
                                                               * Set the snmpTrapOid.0 value
                                                               */
                                                              snmp_varlist_add_variable
                                                              (&var_list,
                                                               snmptrap_oid,
                                                               snmptrap_oid_len,
                                                               ASN_OBJECT_ID,
                                                               pciTraps
#_oid, sizeof(pciTraps#_oid));
                                                               /*
                                                                * Add any extra (optional) objects here
                                                                */
                                                               /*
                                                                * Send the trap to the list of configured destinations
                                                                *  and clean up
                                                                */
                                                               send_v2trap
                                                                 
                                                               (var_list);
                                                               snmp_free_varbind
                                                               (var_list);
                                                               return
                                                               SNMP_ERR_NOERROR;}

raid.h内容:
/*
 * Note: this file originally auto-generated by mib2c using
 *        $
 */
#ifndef LSI_H
#define LSI_H

/*
 * function declarations
 */
int             send_adapterTraps
#_trap(void);
int             send_vdTraps
#_trap(void);
int             send_pdTraps
#_trap(void);
int             send_enclTraps
#_trap(void);
int             send_pciTraps
#_trap(void);
#endif                          /* LSI_H */

程序格式比较乱,请高手帮忙看一下,这个问题已经一个星期了,一直编译报错,谢谢!
搜索更多相关主题的帖子: c语言 操作系统 linux include C语言 
2016-09-23 13:11
unix_c
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2016-9-23
收藏
得分:0 
哪位高手给点意见也可以啊、
2016-09-23 13:52
快速回复:标准c语言编译问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.040609 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved