I am executing a c++ program with large number of recursion function calls. When executing normally it gives stack overflow on runtime. So I am trying to find a way to increase the stack size. I found two methods: first is running but the second if doesn't become true. second method is using the following command while compiling : g++ -std=c++11 -Wl --stack <stack size> file.c -o file. This command gives error that  is not a valid file. So what is the way to increase the stack size. And why are the methods I used not working? And for those asking for code, the code is irrelevant. Its just recursive quicksort with large array of 100k ints.
            Asked
            
        
        
            Active
            
        
            Viewed 306 times
        
    0
            
            
         
    
    
        Shantanu Shinde
        
- 932
- 3
- 23
- 48
- 
                    You omitted commas: -Wl,--stack,900000000 The stack command is passed to link.exe; it must be seen as a single one. – tim18 Jan 30 '19 at 13:13
- 
                    1@tim18 I tried that. It gives error "Missing argument in parameter list" at the "," after -Wl – Shantanu Shinde Jan 31 '19 at 03:24