3. Embedded SQL for COBOL : Preprocessor Operation : The COBOL Compiler--Windows and UNIX : The COBOL Compiler--Windows Micro Focus Net Express
 
Share this page                  
The COBOL Compiler--Windows Micro Focus Net Express
On Windows, use the cobol command to compile the COBOL code generated by the preprocessor. Then use the cblnames command to extract all public symbols into a cbllds.obj file for the linker, and the link utility to bind the objects into an executable.
The following example preprocesses and compiles the file test1:
esqlcbl test1.scb
cobol   test1.cbl  /case  /litlink
cblnames –t  –mtest1  test1.obj
link      /OUT: test1.exe \
          /SUBSYSTEM:CONSOLE \
          /MACHINE:i386 \
          /NOD \
          test1.obj \
          cbllds.obj \
          libingres.lib \
          msvcrt.lib \
          oldnames.lib \
          mfrts32s.lib \
          kernel32.lib \
          user32.lib \
          gdi32.lib \
          advapi32.lib