Subject: linking stripped object files
From: [email-masked] (Chin Chee-Kai)

2 Mar 1997 21:24:14 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Authentication-Warning: gatekeeper.gen.co.jp: smap set sender to <[email-masked]> using -f
Original-To: GNU WIN32 <[email-masked]>
In-Reply-To: <[email-masked]>
Original-Sender: [email-masked]

Problem description:

I have, for example, source files "1.c", "2.c", "3.c" compiled
into objects using:
	gcc -g -c 1.c
	gcc -g -c 2.c
	gcc -g -c 3.c
Linking them producing "a.exe" is fine using:
	gcc -g 1.o 2.o 3.o

Suppose now I do this (which works on Unix, producing an executable
that does not have debugging information):
	rm -f a.exe
	strip *.o
	gcc -g 1.o 2.o 3.o

I get:
C:\CYGNUS\H-I386-CYGWIN32\lib\gcc-lib\i386-cygwin32/cygnus-2.7.2-961023/\
.../../../../i386-cygwin32/lib/libcygwin.a(libcmain.o): In function `main':
/pizza/mushroom/noer/beta17/src/winsup/libcmain.cc:30: undefined reference \
to `WinMain@16'

I got a pizza for free again :)

Anyone has an idea?  

Chin Chee-Kai (Last, First)
Internet Email-ID:	[email-masked]

-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".