euakan@eua.ericsson.se (Theo.Kanter) (09/21/90)
The Compiler reference handbook contains a sample program
on page 116 on how to access DOS command parameters. 
My program is similar and even simpler:
	// re.cpp
	#include <stdio.h>
	main(int argc, char *argv[])
	{
	}
The command 'ztc re.cpp -o re' is successful until it 
comes to BLINK, which spits out something like:
'there exist multiple definitions of the symbol _main
in your program', but more cryptic.
What could possibly be *wrong* with such a trivial program?!
Thanks in advance for any leads, which may solve this puzzle.
-----------------------------------------------------------------------
Theo Kanter		ELLEMTEL Telecommunication Systems Laboratories
			Box 1505, S-125 25 [lvsj| (AElvsjoe), Sweden
			Office:	+46 8 727 35 93
			Fax   :	+46 8 647 82 76
			Telex :	12452 EUA S
			Mail  :	Theo.Kanter@eua.ericsson.sejoe@proto.COM (Joe Huffman) (09/22/90)
In article <1990Sep21.120431.16851@eua.ericsson.se>, euakan@eua.ericsson.se (Theo.Kanter) writes: > // re.cpp > > #include <stdio.h> > > main(int argc, char *argv[]) > { > } > > The command 'ztc re.cpp -o re' is successful until it > comes to BLINK, which spits out something like: > 'there exist multiple definitions of the symbol _main > in your program', but more cryptic. Try printing your program out to a printer. The must be another instance of main() someplace. Past the bottom of your screen? Past the right side? In a corrupted <stdio.h>? Possibly your runtime library is corrupted. Copy the original zls.lib from the distribution disk. Check the LIB environment variable for the path to the libraries... --- Zortech mailing list: send email to 'ztc-list-request@uunet.uu.net' with: Add: your-user-name@your-machine-name In the body of the message. --- Send Zortech bug reports to 'zortech-bugs@proto.com' --- Zortech is my major source of income. Statements about them or their competitors cannot be totally without bias. -- joe@proto.com FAX: 208-263-8772
bright@Data-IO.COM (Walter Bright) (09/22/90)
In article <1990Sep21.120431.16851@eua.ericsson.se> euakan@eua.ericsson.se (Theo.Kanter) writes:
<	// re.cpp
<	#include <stdio.h>
<	main(int argc, char *argv[])
<	{
<	}
<
<The command 'ztc re.cpp -o re' is successful until it 
<comes to BLINK, which spits out something like:
<'there exist multiple definitions of the symbol _main
<in your program', but more cryptic.
<What could possibly be *wrong* with such a trivial program?!
Take out the space between -o re. What is happening is it is compiling
re.cpp twice and trying to link them together.
re.exe is the default output file name, no need for -oreeuakan@eua.ericsson.se (Theo.Kanter) (09/24/90)
bright@Data-IO.COM (Walter Bright) and jb@altair.csustan.edu (John Birchfield) write: > Try ztc re.cpp > if you look closely the ztc shell is passing re twice to blink > the -o option should preceed the source and (unlike cc) there should > not be any space between the -o and the output filename argument in this > case simply means to run the optimizer. Thanks for the advice! I am sorry to have wasted bandwidth with such a trivial matter. Ordinarily I run Sun's c++ compiler. Letting output names default to anything else than a.out must be the DOS influence. Please don't let John C. Dvorak hear about this and have me feature in 'Crazy Mistakes Part IV' in the next issue of PC Magazine.. ----------------------------------------------------------------------- Theo Kanter ELLEMTEL Telecommunication Systems Laboratories Box 1505, S-125 25 [lvsj| (AElvsjoe), Sweden Office: +46 8 727 35 93 Fax : +46 8 647 82 76 Telex : 12452 EUA S Mail : Theo.Kanter@eua.ericsson.se
pnl@hpfinote.HP.COM (Peter Lim) (09/26/90)
> >Take out the space between -o re. What is happening is it is compiling >re.cpp twice and trying to link them together. >re.exe is the default output file name, no need for -ore >---------- Actually, I thought most compiler uses "-o re" rather then "-ore". I do find this aspect of Zortech compiler a bit annoying. Does anyone agree with me ? Does "-ore" work with MSC or TC ? Regards, ## Life is fast enough as it is ........ Peter Lim. ## .... DON'T PUSH IT !! >>>-------, ########################################### : E-mail: plim@hpsgwg.HP.COM Snail-mail: Hewlett Packard Singapore, : Tel: (065)-279-2289 (ICDS, ICS) | Telnet: 520-2289 1150 Depot Road, __\@/__ ... also at: pnl@hpfipnl.HP.COM Singapore 0410. SPLAT ! #include <standard_disclaimer.hpp>