Previous Application Programming: Creating IDL Projects Next

Selecting the Build Order

The build order of a project determines the order in which the files will be compiled. In some cases, you might not be able to run all the files in your project because of dependencies on the order in which they are compiled. For example, if the file main.pro contains:

Pro main  
   x=1  
   y=AddTen(x)  
   Print, x  
End  

and file AddTen.pro contains:

Function AddTen, x  
   x=x+10  
End  

IDL can't tell if the statement y=AddTen(x) is referring to a variable named AddTen or a function named AddTen. Unless AddTen is compiled before main, you will get a "Variable undefined" error message.

To select the build order for the files in your project, complete the following steps:

  1. Open your project. Select File Open Project. Select the path and name of your project file.
  2.  

  3. Click the Build Order tab in the Project window.
  4.  

  5. Move the files to the order in which you want to compile them. The topmost file listed in the Build Order window will be compiled first. On Windows, move a file by dragging and dropping it to the desired location. On Motif, first select a file by left-clicking it, then change the order by using the up and down arrows located in the bottom left corner of the Project window.
  6.  

  7. For example, using the scenario stated previously, the Build Order would look like the following:
  8.  

    Figure 22-10: Build Order Window

    Figure 22-10: Build Order Window

     

  9. Save your project file by selecting File Save Project.
  10.  


    Note
    If the Compile File option is deselected, the file will not show in the Build Order window. For more information on file properties, see Setting the Properties of a File.

  IDL Online Help (March 06, 2007)