Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!microsoft!earleh From: earleh@microsoft.UUCP (Earle HORTON) Newsgroups: comp.sys.mac.programmer Subject: Re: byacc problems under MPW Message-ID: <56317@microsoft.UUCP> Date: 6 Aug 90 04:31:42 GMT References: Reply-To: earleh@microsoft.UUCP (Earle HORTON) Organization: Microsoft Corp., Redmond WA Lines: 31 In article gb2a+@andrew.cmu.edu (George J. Baxter) writes: >after much tweaking and editing, we finally got everything to compile >and mostly link. The problem now is that the Code Segment produced >is too big (33286, where the limit is 32760). Does anyone know how >to get around this? (We generally use Think-C, and our MPW expert >is on vacation.) You want to split the program up into a number of different segments. The quickest way to do this is by using the "-s" option of the MPW C compiler. Put something like this in your MPW Makefile default rules section: .c.o .c c {default}.c -o {default}.c.o -s {default} This will cause the C compiler to put directives in each ".c.o" file telling the linker to place generated code in a segment named after the file. Code produced from "foo.c" will then wind up in segment "foo." If you already have make rules for individual source files, then add a "-s" option to the compiler line for each. This method will most probably not produce the optimum segmentation for your program. It is the quickest way to segment a large C program that you are porting from another environment, however. It also doesn't require you to change the C source code. These opinions are not necessarily shared by my employer. Earle Horton