Batch programs in OpendTect
What we call a 'batch program' is usually called 'console program' on Windows. All our batch programs accept a single parameter file as argument, and optionally '-bg' if it has to run in the background (it will be ignored on Windows though).
Rather than specifying a 'main', you have to specify:
Log file: window
other possibilities are 'stdout' or a file name.
That reveals what the par file is: a standard OpendTect Ascii data file with an asistream/ascostream header (see Basic/ascstream.h) and as contents a single IOPar written with
const bool usewavelet = pars().isTrue( "Use Wavelet" );
That would become false if the par file contains a line like:
Use Wavelet: No
Rather than returning an
SET(OD_MODULE_BATCHPROGS your_program_file_name_without_cc_extension )
Output from the example program: