Porting C-Source to OS/400
Jump to navigation
Jump to search
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).
- Create two appropriate SRCPF with matching maximum line lengths:
- 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.