Path: utzoo!attcan!uunet!husc6!mailrus!ames!pasteur!cory.Berkeley.EDU!soohoo From: soohoo@cory.Berkeley.EDU (Ken Soohoo) Newsgroups: comp.sys.atari.st Subject: Re: argc and argv with gem Keywords: MWC, argc, argv, GEM, commands. Message-ID: <5696@pasteur.Berkeley.EDU> Date: 15 Sep 88 17:42:38 GMT References: <358@island.uu.net> <626@mace.cc.purdue.edu> <3441@boulder.Colorado.EDU> Sender: news@pasteur.Berkeley.EDU Reply-To: soohoo@cory.Berkeley.EDU.UUCP (Ken Soohoo) Organization: University of California, Berkeley Lines: 25 In article <3441@boulder.Colorado.EDU> cochrane@spot.Colorado.EDU (COCHRANE JIM T) writes: > > > >How does one go about writing a GEM program that will accept arguments to >main via argc and argv? I'm using Mark Williams C and when I try to use >argc and argv with a GEM program the program bombs. > >Thanks for any help, >Jim Cochrane As far as I know, with MWC 3.0 (2.1.7 also), the method for using argc and argv from a GEM type program is to NOT use the -VGEM flag, instead, use the -laes -lvdi options as the last part of your cc command: cc -o myprog.prg main.o mod1.o mod2.o -laes -lvdi As far as _I_ can tell, argv[0] is undefined, and is NOT standard K&R from the desktop, but from the MSH shell it's OK (supposed to be the name of the program being executed). --Kenneth Soohoo (soohoo@cory.Berkeley.Edu) Atari 400/800/600xl/800xl/1200/130xe/65xe, 1040ST hacker Sometime Berkeley Student, othertimes... My opinions are my OWN, not necessarily Atari's