I have one problem with idl2java ant
task (I'm using org.jacorb.idl.JacIDL). This very problem doesn't exist with my cpp implementation of generating cpp code form idl files.
I have 3 *.idl files, let's say:
Each one is in folder named after file in psm directory, now:
A.idl consists of basic types only,
B.idl includes A.idl and also have some basic types,
C.idl includes B.idl and A.idl in that specific order.
I can't change include order. Building A and B generates no problem. Building C generates error:
[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.
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.
Could you also clarify what version of JacORB you are using - can you reproduce the problem with 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 ?