/F (Set Stack Size)

/F[ ]number

This option sets the program stack size in bytes. Without this option, the stack size defaults to 1 MB. The number argument can be in decimal or C-language notation. The argument can range from 1 to the maximum stack size accepted by the linker. The linker rounds up the specified value to the nearest 4 bytes. The space between /F and number is optional.

You may need to increase the stack size if your program gets stack-overflow messages.

Other ways to set the stack size

  • Using the /STACK linker option.
  • Using EDITBIN on the .exe file.

IDE Settings (Project Settings dialog box)

Tab Category Control Setting
C/C++ C/C++ Language Project Options Type /F in the text box, adding the desired stack size in bytes.