delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/03/02/21:24:14

From: cheekai AT gen DOT co DOT jp (Chin Chee-Kai)
Subject: linking stripped object files
2 Mar 1997 21:24:14 -0800 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <Pine.3.07.9703031328.A26771-a100000.cygnus.gnu-win32@sumimasen.gen.co.jp>
Mime-Version: 1.0
X-Authentication-Warning: gatekeeper.gen.co.jp: smap set sender to <cheekai AT gen DOT co DOT jp> using -f
Original-To: GNU WIN32 <gnu-win32 AT cygnus DOT com>
In-Reply-To: <Pine.3.07.9703031117.D25784-b100000@sumimasen.gen.co.jp>
Original-Sender: owner-gnu-win32 AT cygnus DOT com

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 AT 16'

I got a pizza for free again :)

Anyone has an idea?  


Chin Chee-Kai (Last, First)
Internet Email-ID:	cheekai AT gen DOT co DOT jp

-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019