VISUAL STUDIO CLI (WINDOWS)

VISUAL STUDIO CLI SYNTAX

PS C:\> cl /MD /Od /Zi /FA 14_scanf_error_check.c
 * the /MD flag tells the compiler to link against the multithreaded DLL version of 
   the C runtime library. 
    - it is typically used when you want to dynamically link to the C runtime 
      rather than statically linking.
 * the /Od flag disables optimization. It is useful for debugging because it keeps 
   the code in a form that is easier to follow during debugging, making the code 
   more predictable and easier to debug.
   
 * the /Zi flag enables debugging information. It generates the necessary debug 
   information to allow a debugger (like Visual Studio) to debug your program 
   effectively.
   
 * the /FA flag generates an assembly listing for the source file. It creates a 
   .asm file that contains the assembly code corresponding to your C code.

VISUAL STUDIO W/O DEBUGGING SYNTAX

PS C:\> cl /MD sourceCode.c
 * this cmd will compile the given binary w/o any debug symbols

Last updated