How do I capture compiler warnings and errors?
How do I capture compiler warnings and errors?
Quick answer: The compiler warnings are captured in <home>/op_admin/tmp/cc_err.* For process models, the op_mko utility does print out compiler warnings to the standard output, as long as the warning-reporting for your compiler is enabled. To demonstrate this, please issue the following command: op_mko -m sink -type pr -comp_flags -Wall The -Wall flag will display all warnings generated by the gcc compiler. You may need to specify different flags if you are using a compiler other than gcc.* For other types of files (such as external code files, pipeline stages, and EMA code), warnings are not displayed, but still accessible by looking in the ~/op_admin/tmp/cc_err compiler log file. For example, issue the following command to see compiler warnings from compiling a pipeline stage: op_mko -m dpt_propdel -type ps -comp_flags -Wall && if ( -r ~/op_admin/tmp/cc_err) cat ~/op_admin/tmp/cc_err; because op_mko deletes cc_err if no warnings or errors are issued by the compiler, an if() statement checks to see if cc_err exists before attempting to display it.For further information on OPNET compilation utilities, please refer to the External Compiler Interface chapter of the External Interfaces volume of the OPNET Modeler documentation.
Compiling/Linking