Path: utzoo!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!timbuk!cs.umn.edu!quest!orbit!kksys!jhereg!andrew From: andrew@jhereg.osa.com (Andrew C. Esh) Newsgroups: comp.sys.mac.programmer Subject: Re: Help on "C++ Programming with MacApp" book needed Message-ID: <1991Mar5.155430.3246@jhereg.osa.com> Date: 5 Mar 91 15:54:30 GMT References: <1991Mar3.161029.16931@Informatik.TU-Muenchen.DE> <9612@hub.ucsb.edu> <1991Mar04.172038.4060@lynx.CS.ORST.EDU> Organization: Open Systems Architects, Inc., Mpls, MN Lines: 26 In article <1991Mar04.172038.4060@lynx.CS.ORST.EDU> curreyr@argus.UUCP (Robert W. Currey) writes: > >I was also having that problem getting MacApp and C++ to work using >MABuild. In the Startup*MacApp file there is a variable defined called >MABuildDefaults. This holds the various options you want as the default >during the build process. For the linker there is an option -m that I >guess tells the linker what the name of the main proedure of your >appliucation (Apple can correct me if I wrong since I never did see any >reference to this option in the help files). So setting '-m main' in >the MABuildDefaults variable should fixx the problem. > >BTW, I'm using System 7.0b1, MPW 3.2b??, MPW C++ 3.1, MacApp 2.0. > >-Rob Currey curreyr@argus.math.cs.orst.edu Correct me if I'm wrong, but the linker defaults to "main". What is happening is the first few entries in the symbol table are getting overwritten, one of which is "main". Since the garbage that is sitting in the first entry's spot does not match the default "main" that the linker is looking for, it flags an error and stops. It is a problem with the C++ compiler. It trashes the entries, and the linker can't read it. -- Andrew C. Esh andrew@osa.com Open Systems Architects, Inc. Minneapolis, MN 55416-1528 So much System, (612) 525-0000 so little CPU time...