X

Help Articles are product support tips and information straight from the NV5 Geospatial Technical Support team developed to help you use our products to their fullest potential.



5999 Rate this article:
No rating

How do I change the build order of IDL source files in an IDL 7.0 Workbench project?

Topic:
Build order issues can often be avoided by the use of one or more of the appropriate directives like

  • COMPILE_OPT STRICTARR
  • COMPILE_OPT IDL2
  • FORWARD_FUNCTION

--at the top of all routines that call user or library functions. However, there can be times when a specific customized build order is desirable.



In the IDL 7.0 Workbench (IDLDE), there is not a GUI interface way to change the compile order of your IDL source code files in an IDL project. Instead, to explicitly control the way that each of the files in a project are compiled, one needs to write and maintain a custom build command script or program.Discussion:


For example, to make a custom build command script for files named

one.pro

,

two.pro

,

three.pro

, which you would like to compile in the order of the numerical name rather than alphabetical order of the file names. In this case you could create a batch script file called

mybuildcmds.pro

with the following lines:



    .compile one
    .compile two
    .compile three
    RESOLVE_ALL

You might then just manually run your IDL build script to compile your project, for example:



    IDL> @mybuildcmds

(-- and then, if needed, call an IDL SAVE command to create your application *.sav file).



Alternatively, you could place the build script call into the Project->Properties dialog for your project as follows:



  1. Select the project in question in the Project Explorer window (expose by selecting Window > Show View > Other... > General > Project Explorer)

  2. Then select the Project->Properties menu item

  3. Select the "Use a custom build command" button then enter the build batch script command file call, for example:

      @mybuildcmds

    --into the associated field.

Custom build command setting in IDL Project Preference dialog



Note that by setting the "Use a custom build command" button, no files in the project will be compiled except as specified by the custom build command script. (Notice also that the "Create a save file" box is checked and a output *.sav file is specified in order to automatically create a save file when the project is built.)




For additional information please also see the IDL help system contents section:



  • IDL Workbench Guide > Tasks > Running and Building IDL Projects

and subsections:



  • Example Custom Build Routines
  • Solving Build Order Problems

For additional information about IDL batch scripts, see the IDL help contents under the section:



  • IDL Programmers' Guides > Application Programming > Part I: Application Programming > Executing Batch Jobs in IDL

Related IDL help system topics: RESOLVE_ALL, RESOLVE_ROUTINE, ITRESOLVE, COMPILE_OPT, FOWARD_FUNCTION, .COMPILE




<< keywords: build order, compile order, project files, custom build command, custom build order, batch script file, include file, resolve_routine, itresolve, foward_function, compile_opt, .compile >>


Solution:
[Edit this field in the IDL-based Tech Tip Editor, v62]

Please login or register to post comments.
Featured

End-of-Life Policy Enforcement for ENVI 5.3 / IDL 8.5 and Earlier Versions

5/6/2024

April 1, 2024 Dear ENVI/IDL Customer,  We are reaching out to notify you of our supported... more »

How to Upgrade licenses to ENVI 6.x / IDL 9.x

12/5/2023

What is the new Upgrade function? Starting with ENVI 6.0 and IDL 9.0, we have implemented an... more »

What to do if the 'License Administrator - License Server' for the Next-Generation License Server does not start?

6/13/2023

Background: With the release of ENVI 5.7 & IDL 8.9 and the corresponding Next-Generation licensing... more »

Next-Generation Licensing FAQ

4/28/2023

  NV5 Geospatial has adopted a new licensing technology for all future releases of our ENVI, IDL... more »

The IDL Virtual Machine

6/6/2013

What is the IDL Virtual Machine? An IDL Virtual Machine is a runtime version of IDL that can... more »