Compiling the IDL with TAO

Before we can write our C++ client or server applications, we must compile the IDL file. From a Unix shell, in which the TAO_ROOT environment variable is properly set, we would invoke the TAO compiler like this:
	$ $TAO_ROOT/TAO_IDL/tao_idl Hello.idl
Or from a Win32 shell, assuming ACE_ROOT is set, something like this:
	C:\Hello> %ACE_ROOT%\bin\tao_idl.exe Hello.idl
Assuming no syntactic errors, the TAO IDL compiler creates 9 source files for each IDL file it compiles. Its naming convention for client-side "stub" classes, with which client applications link, involves the concatenation of the basename of the IDL file -- in this case, "Hello" -- with a 'C'. For the server-side "skeleton" classes, an 'S' is appended to the basename. The CORBA spec provides for a parameterized class called a "tie" template used to adapt legacy code to a CORBA interface. The files with a basename suffix of "S_T" define the "tie" template for our World interface. Tie classes will not be covered in this tutorial. There are a number of options you may specify on the command line when running tao_idl. Use --help to see a list of them.

Now let's see how to write a C++ server that implements our CORBA interface.

Back to... [ Corba Tutorials ]


Jim Crossley
Last modified: Wed Mar 24 15:47:21 EST 1999