简体   繁体   English

使用JacORB在* .idl文件中包含订单

[英]Include order in *.idl file with JacORB

I have one problem with idl2java ant task (I'm using org.jacorb.idl. JacIDL ). 我有一个idl2java ant任务的问题(我正在使用org.jacorb.idl.JacIDL )。 This very problem doesn't exist with my cpp implementation of generating cpp code form idl files. 我的cpp实现生成cpp代码表单idl文件时不存在这个问题。

I have 3 *.idl files, let's say: 我有3 * .idl文件,让我们说:

  • A.idl A.idl
  • B.idl B.idl
  • C.idl C.idl

Each one is in folder named after file in psm directory, now: 每个都在psm目录中以文件命名的文件夹中,现在:
A.idl consists of basic types only, A.idl仅包含基本类型,
B.idl includes A.idl and also have some basic types, B.idl包括A.idl ,也有一些基本类型,
C.idl includes B.idl and A.idl in that specific order . C.idl以该特定顺序包括B.idlA.idl

I can't change include order. 我无法更改包含订单。 Building A and B generates no problem. 建筑物AB没有问题。 Building C generates error: 构建C会生成错误:

[jacorb.idl] ERROR : C.idl, line:16(52): Undefined name: 

Shifting includes to A,B order instead B,A resolves problem, but I will repeat myself - I can't do that for variety of reasons, one of which is fact that cpp implementation besed on ACE library works fine. 转移包括A,B顺序而不是B,A解决问题,但我会重复自己 - 我不能因为各种原因这样做,其中一个事实是ACE库上的cpp实现很好。

So I ask politely for you help, because I have no idea if that can be helped. 所以我礼貌地请你帮忙,因为我不知道这是否有帮助。 Here's my actual task as bonus - maybe it will help (if there's a typo sorry, it's only here - code 'works'). 这是我的实际任务作为奖金 - 也许它会有所帮助(如果有一个错误的抱歉,它只在这里 - 代码'工作')。

<target name="idlj-generate" depends="idlj-init">
    <idl2java
    srcdir="${psm.dir}/${project}/"
    destdir="${build.generated.dir}"
    packageprefix="com.mypackageprefix"
    includepath="${psm.dir}"
    all="true">
        <define key="__JACORB_GENERATE__"/>
        <define key="globalimport" value="true"/>
    </idl2java>
</target>

and for informational purposes working piece: 以及用于提供信息的工件:

<taskdef name="idl2java" classname="org.jacorb.idl.JacIDL">
    <classpath refid="idlj.classpath"/>
</taskdef>

You would be best asking JacORB questions on the jacorb-developer mailing list. 你最好在jacorb-developer邮件列表上询问JacORB问题。

Could you also clarify what version of JacORB you are using - can you reproduce the problem with 3.6? 你能否澄清一下你正在使用的JacORB版本 - 你能用3.6再现问题吗?

You haven't provided sufficient information to state what is undefined. 您尚未提供足够的信息来说明未定义的内容。

Have you tried removing the "all" flag and compiling them one at a time ? 您是否尝试删除“all”标志并一次编译一个?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM