[jacorb-developer] JacORB 3.4 documentation - 25.1 IDL - intrinsic preprocessor symbol does not seem to work as described

Timothy Astle timothy.astle at caris.com
Sun May 11 03:03:09 CEST 2014


My choice of terminology and explanation waspoor.

I'm generating sources for the ImplRepo.pidl from TAO.  I use JacORB to 
make calls into the TAO Implementation Repository for administration 
tasks.  The ImplRepo.idl needs to include the orb.idl, so I supply the 
JacORB orb.idl (because it works).

If I don't provide the cited additional compiler arguments to explicitly 
define the preprocessor symbols, the source generation fails.

_PRE_3_0_COMPILER_ -> Keeps the compiler from complaining that it 
doesn't know what "module" is on the module CORBA line in the orb.idl
JACORB -> avoided the comma problem / abstract issue

When it failed the first time, I decided to use -U because the 
documentation said the preprocessor symbols were intrinsic, but it 
didn't change the behaviour.  Setting them allowed the source to be 
compiled.

I'm probably missing something, or a few things :)

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>idlj-maven-plugin</artifactId>
<version>1.2.1</version>
                     <executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
                     </executions>
<configuration>
<compiler>jacorb</compiler>
                         <sources>
<source>
<includes>
<include>**/ImplRepo.idl</include>
</includes>
<additionalArguments>
<additionalArgument>-D_PRE_3_0_COMPILER_</additionalArgument>
<additionalArgument>-DJACORB</additionalArgument>
</additionalArguments>
<compatible>false</compatible>
<emitStubs>true</emitStubs>
<emitSkeletons>true</emitSkeletons>
</source>
                         </sources>
<includeDirs>
<!-- Just where I've placed the TAO and JacORB IDLs to be included -->
<includeDir>src/main/idl/jacorb</includeDir>
<includeDir>src/main/idl</includeDir>
</includeDirs>
<dependencies>
<dependency>
<groupId>org.jacorb</groupId>
<artifactId>jacorb-idl-compiler</artifactId>
<version>3.4</version>
</dependency>
</dependencies>
</configuration>
                 </plugin>




On 09/05/2014 5:14 PM, Nick Cross wrote:
>
>
>
> On 09/05/14 19:11, Timothy Astle wrote:
>> http://www.jacorb.org/releases/3.4/ProgrammingGuide.pdf
>>
>> I updated to build the JacORB 3.4 orb.idl and hit some IDL compilation
>> errors.  So I read the documentation :)  From what I can tell, it is
>> saying that JACORB and _PRE_3_0_COMPILER_ are both set by default.  So I
>> tried using -U to unset them, but it didn't solve my problem. So I
>> instead tried to set them -DJACORB, -D_PRE_3_0_COMPILER_ and that
>> allowed the IDL to be compiled.
>>
>> I'm using the Maven idlj compiler plugin, and I'm making the assumption
>> that it doesn't undefine preprocessor symbols.
>>
>> So I think there is a mistake in the documentation?  Can someone 
>> confirm?
>>
>>
>
>
> Hi,
>
> The idl compiler does define those symbols. You should not need to 
> compile orb.idl (its been done for you). I think you would need
>
>  <plugin>
>                 <groupId>org.codehaus.mojo</groupId>
> <artifactId>idlj-maven-plugin</artifactId>
>                 <executions>
>                     <execution>
>             <id>1</id>
>                         <goals>
>                             <goal>generate</goal>
>                         </goals>
>                         <configuration>
>                             <sources>
>                                 <source>
>                                     <includes>
> <include>orb.idl</include>
>                                     </includes>
>                                     <additionalArguments>
>
> <additionalArgument>-ir</additionalArgument>
>
> <additionalArgument>-sloppy_forward</additionalArgument>
>
> <additionalArgument>-i2jpackage</additionalArgument>
>
> <additionalArgument>:org.omg</additionalArgument>
>
> <additionalArgument>-all</additionalArgument>
>                                     </additionalArguments>
>                                 </source>
>                             </sources>
>                         </configuration>
>                     </execution>
>
> to compile orb.idl
>
> Cheeers
>
> Nick
> _______________________________________________
> jacorb-developer maillist  - 
> jacorb-developer at lists.spline.inf.fu-berlin.de
> https://lists.spline.inf.fu-berlin.de/mailman/listinfo/jacorb-developer
>
>

-- 
Tim Astle
Development Manager
Web Technologies

*CARIS* <http://www.caris.com>
115 Waggoners Lane
Fredericton, New Brunswick
Canada    E3B 2L4
Tel: +1.506.458.8533     Fax: +1.506.459.3849
www.caris.com

*CARIS 2014*
June 2-5, 2014 | Brest, France | 2-5 juin, 2014
Join us in France at CARIS 2014 as we focus on Developing the Blue 
Economy. www.caris.com/caris2014/
Venez nous rejoindre en France pour CARIS 2014 et appuyons ensemble 
l'Économie Bleue. www.caris.com/caris2014-fr/

Download your free copy of CARIS Easy View today!
www.caris.com/easyview

_________________________________________________________________________
This email and any files transmitted with it are confidential and 
intended only for the addressee(s). If you are not the intended 
recipient(s) please notify us by email reply. You should not use, 
disclose, distribute or copy this communication if received in error.

Any views or opinions expressed in this email are solely those of the 
author and do not necessarily represent those of the company. No binding 
contract will result from this email until such time as a written 
document is signed on behalf of the company.



More information about the jacorb-developer mailing list