Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mit-eddie!uw-beaver!sumax!amc-gw!pilchuck!dataio!fnx!nazgul!bright From: bright@nazgul.UUCP (Walter Bright) Newsgroups: comp.lang.c Subject: Re: Help needed with MSC error 'main' > 32K Message-ID: <179@nazgul.UUCP> Date: 23 Nov 90 21:22:36 GMT References: <20279.2749b4b0@oregon.uoregon.edu> Reply-To: bright@nazgul.UUCP (Walter Bright) Distribution: usa Organization: Zortech, Seattle Lines: 20 In article <20279.2749b4b0@oregon.uoregon.edu> michelbi@oregon.uoregon.edu writes: /I am having trouble with a fatal compilation error in Microsoft C 6.0 and /QuickC 2.5. The error message is as follows: / fatal error C1126: 'main' : automatic allocation exceeds 32K /The only unusual thing that I can see with my main is the size of 4 arrays, /each having 5000 float elements. If I declare these arrays global to the /program (ie before 'main()' declaration) the program will compile just fine. I assume your program looks like: main() { float a[5000]; float b[5000]; float c[5000]; float d[5000]; ... } A bit of multiplication gives us 80,000 bytes you are trying to allocate on the stack. The PC hardware only allows a 64k byte stack, MSC allows something less than that. You'll need to allocate arrays that large statically, or use malloc() to dynamically generate storage for them.