Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uwmcsd1!marque!uunet!mcvax!hp4nl!philmds!leo From: leo@philmds.UUCP (Leo de Wit) Newsgroups: comp.sys.atari.st Subject: Re: Lattice C - Help! Message-ID: <784@philmds.UUCP> Date: 31 Aug 88 11:03:06 GMT References: <571@laura.UUCP> Reply-To: leo@philmds.UUCP (Leo de Wit) Organization: Philips I&E DTS Eindhoven Lines: 46 In article <571@laura.UUCP> markhof@exunido.UUCP (Ingolf Markhof) writes: >The Lattice C compiler prints its error messages on the screen. This is only >less helpful. I'd like to get the error messages written into a file. So, how >can I tell the compiler to write such a file? I don't have the newest version of Lattice C, so things might have changed... If you start LC1.TTP and LC2.TTP yourself (I mean: not using LC.TTP) you can use redirection in the command string offered to these programs (they handle redirection themselves); e.g. LC1.TTP >error1.out lc1_options myfile LC2.TTP >error2.out lc2_options myfile Note that the redirection must be the first argument, or it will be misinterpreted. Also note that you have to quote the '>' if you're running from a shell that handles redirection (<,>,<<,>>), or else the shell will try to do the redirection (which might fail). There's another annoying fact about Lattice discriminating between console and file output (again, maybe it has changed): If you use LC.TTP to compile, you will notice it will wait for a keypress before finishing. This is quite annoying if you run from a make program, or use batch processing. I can understand why it has been done: to be able to see the compiler output before returning to the Desktop. If you use LC1.TTP and LC2.TTP to compile, you will see they also wait for a keypress before finishing. The odd thing is, they don't wait when started from LC.TTP (this one starts them each in turn). The reason is that LC.TTP starts them each with a first argument of '>CON:'; this value is treated as a special one by both LC1.TTP and LC2.TTP. When I found out about all that, I decided to write my own cc program that starts the LC1.TTP and LC2.TTP with a first argument of '>CON:', also starts the linker LINK.TTP with a suitable link description file, handles its parameters more 'a la Unix' and DOES NOT WAIT FOR A KEYPRESS. (If someone's interested, mail me). The output is still directed to the console, but that's no problem: if fastdump.prg is installed (can even start it at that moment) an Alt-Help will do a fast ascii screen dump to my printer, which is even nicer than having error messages in a file (unless you have something like the Unix utility error that can merge an error file into your source file). Hope this helps you out - Leo.