为什么IDL不完整



我在Linux上使用OpenDDS3.4.1,并试图手动编译IDL,因为我已经有了该项目的构建系统,只想生成所需的文件并进行集成。这里是我正在使用的测试IDL。

#include "orbsvcs/TimeBase.idl"
module StockQuoter {
#pragma DCPS_DATA_TYPE "StockQuoter::Quote"
#pragma DCPS_DATA_KEY "StockQuoter::Quote ticker"
    struct Quote {
        string ticker;
        string exchange;
        string full_name;
        double value;
        TimeBase::TimeT timestamp;
    };
};

然后按如下方式编译IDL:

$ opendds_idl ./StockQuoter.idl
processing ./StockQuoter.idl
$ tao_idl -I$DDS_ROOT/DDS -I$TAO_ROOT/orbsvcs ./StockQuoter.idl
processing ./StockQuoter.idl

但是,一旦我在生成的idl上使用tao_idl,我就会得到以下内容:

$tao_idl -I$DDS_ROOT/DDS -I$TAO_ROOT/orbsvcs ./StockQuoterTypeSupport.idl
.../ACE_wrappers/bin/tao_idl: "./StockQuoterTypeSupport.idl", line 21: module must contain at least one declaration: ::StockQuoter
.../ACE_wrappers/bin/tao_idl: "./StockQuoterTypeSupport.idl", line 21: module must contain at least one declaration: ::StockQuoter
.../ACE_wrappers/bin/tao_idl: "./StockQuoterTypeSupport.idl", line 21: module must contain at least one declaration: ::StockQuoter
.../ACE_wrappers/bin/tao_idl: "./StockQuoterTypeSupport.idl", line 21: module must contain at least one declaration: ::StockQuoter

当然,结果意味着我无法在pub/subs中注册类型支持,因为所需的对象丢失了,我可以通过查看StockQuoterTypeSupport.idl文件来确认。我查看了OpenDDS开发指南中关于OpenDDS_idl参数的第8章,但似乎什么都不起作用。有什么想法吗?

编辑:
以下是生成的IDL StockQuoterTypeSupport.IDL.

/* Generated by .../DDS/bin/opendds_idl version 3.4.1 (ACE version 5.6a_p14)  
   running on input file ./StockQuoter.idl*/
#ifndef OPENDDS_IDL_GENERATED_STOCKQUOTERTYPESUPPORT_IDL_X54N2R
#define OPENDDS_IDL_GENERATED_STOCKQUOTERTYPESUPPORT_IDL_X54N2R
#include "./StockQuoter.idl"
#include "dds/DdsDcpsInfrastructure.idl"
#include "dds/DdsDcpsPublication.idl"
#include "dds/DdsDcpsSubscriptionExt.idl"
#include "dds/DdsDcpsTopic.idl"
#include "dds/DdsDcpsTypeSupportExt.idl"
/* Begin MODULE: StockQuoter */
/* Begin STRUCT: Quote */
module StockQuoter {
};
/* End STRUCT: Quote */
/* End MODULE: StockQuoter */
#endif /* OPENDDS_IDL_GENERATED_STOCKQUOTERTYPESUPPORT_IDL_X54N2R */

看起来opendds_idl编译器有问题。你能试着用ACE/TAO x.2.3重新编译OpenDDS吗?你可以从download.dre.vanderbilt.edu获得它。我的系统上有这种组合,它可以正常工作。

相关内容

  • 没有找到相关文章

最新更新