Porting C-Source to OS/400

From Try-AS/400
Revision as of 17:00, 10 February 2019 by PoC (talk | contribs) (Created page with "{{FIXME|Complete with Links to all necessary Books.}} == Compiling in QSYS.LIB == * Find out longest line in all C- und H-Files, ** Create '''two''' appropriate SRCPF with ma...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Qsicon Fixme.png This article isn't finished yet or needs to be revised. Please keep in mind that thus it may be incomplete.

Reason: Complete with Links to all necessary Books.

Compiling in QSYS.LIB

  • Find out longest line in all C- und H-Files,
    • Create two appropriate SRCPF with matching maximum line lengths:
      • One for C-Files (may be named QCSRC),
      • One for H-Files (must be named H).
  • Copy all C-Files into QCSRC,
    • omit the .c-extension on files,
    • set type to C.
  • Copy all H-Files into a H,
    • omit the .h-extension on files,
    • set type to C.

The precompiler searches private includes in *LIBL/H, without the .h-Extension.

Compile Object files as follows:

CMD(CRTCMOD MODULE(*CURLIB/MAIN) SRCFILE(*CURLIB/QCSRC) DEFINE(DEF1 DEF2=1) OPTION(*LOGMSG)

Possibly add SYSIFCOPT(*IFS64IO) if large file support is desired.

If Compilation fails, output will go into a spooled file in QEZJOBLOG queue.