Next Previous Up Top Contents Index

7 Creating CORBA Projects

7.2 Creating CORBA projects

To create a CORBA project with the New Project wizard:

1. Choose File > New... from any window or click the New Project () button in the main window.
If you chose File > New... from a project window, remember to uncheck the "Insert file into project?" box unless you intend your new project to be a subproject.
2. Select "Project" and click OK.
The New Project wizard appears.
3. In the "Project Type" section, select "CORBA Client and/or Server" and click Next.
The wizard's CORBA options page appears.

Figure 7.1 Selecting an IDL file.

4. In the "CORBA IDL file" section, choose an IDL file on which to base the project.

The wizard copies the IDL file into the project folder which you choose on the next wizard page. If the IDL file is already in that folder, it is left there.

Alternatively, the wizard can generate a blank IDL file for you. Uncheck the "Use existing IDL file" to make that happen. The blank IDL file will be written into the project folder you choose on the next wizard page. The IDL file will have the same name as the project, with the extension .idl.

5. In the "Projects to generate" section, choose whether to generate a client or server project, or both.

The Advanced... button next to the client and server options produces a dialog containing several ORB-related options. See "Setting ORB options" on page 79 for details.

6. Click Next.

The next page is the standard wizard page for naming a project and specifying its location. (See Chapter 4 of Getting Started with Functional Developer for details.)

The project name you specify here is not used literally when the wizard creates the project or projects. Instead, if you chose to create a client project, the wizard creates a project called name-client, where name is the project name you specified. If you chose to create a server project, the project will be called name-server.

Similarly, the project folder you specify is used as the overall project folder name, with the project files and sources for clients and servers in subfolders of the appropriate name. For a project folder phat, you get the following structure on disk (assuming you chose to create both client and server projects):

phat\
  client\
  server\

If you chose to create a blank IDL file for your project by unchecking the "Use existing IDL file" box, your blank IDL file is created in the top-level project folder:

phat\
  client\
  server\
  phat.idl

The client and server projects themselves are created in subfolders of the top-level project folder called client and server.

7. Enter a project name and location, and click Next.
The wizard moves on to the Use libraries page. This and the remaining wizard pages are as for ordinary projects.
8. Complete the remaining pages in the wizard to finish specifying the non-CORBA parts of your project or projects.

Note: If you choose to generate client and server projects, note that the project settings and library choices you make in the wizard will apply to both generated projects. If you want the two projects to have different settings or use different libraries, you must create both separately. The only exception to this is your choice of Advanced ORB Settings, which can be set differently for client and server projects in the "Projects to generate" section of the wizard's CORBA options page. See "Setting ORB options" on page 79.

Note: The interface projects (that is, the client stubs, server skeletons, and protocol projects that provide a static interface to the main project's IDL) are not generated until you first build your client or server project. When you do so, the IDL compiler is invoked and the necessary interface projects are created automatically. See "How the spec file affects IDL compilation" on page 83 for details of what projects are generated and where.


Developing Component Software with CORBA - 26 May 1999

Next Previous Up Top Contents Index