Блог пользователя wraith_11

Автор wraith_11, история, 4 года назад, По-английски

codeforces uses this command to compile C++ Codes g++ -Wall -Wextra -Wconversion -static -DONLINE_JUDGE -Wl,--stack=268435456 -O2 -std=c++20 <source> . When I am using this command on my Macbook Air M1, it's giving me the error unknown option: --stack=268435456. Can anyone tell me how do I increase the stack size for c++ codes during compilation on a Macbook, I am using gcc-homebrew 11.2.0

My compilation code is g++ -Wconversion -Davik_local -Wl,--stack=268435456 -O2 -std=c++20 Thank You!

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

This command which you are mentioning is for windows systems, for linux based systems use ulimit -s unlimited. This gives unlimited stack size but if you want limited ones like 256 MB then use the command ulimit -s <size in kb>.