From: fjh AT cs DOT mu DOT OZ DOT AU (Fergus Henderson) Subject: Re: linking stripped object files 3 Mar 1997 03:29:51 -0800 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <199703030759.SAA32338.cygnus.gnu-win32@murlibobo.cs.mu.OZ.AU> Content-Type: text Original-To: cheekai AT gen DOT co DOT jp (Chin Chee-Kai) Original-Cc: gnu-win32 AT cygnus DOT com (gnu-win32) In-Reply-To: from "Chin Chee-Kai" at Mar 3, 97 01:35:29 pm X-Mailer: ELM [version 2.4 PL24] Original-Sender: owner-gnu-win32 AT cygnus DOT com Chin Chee-Kai, you wrote: > > 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 Which Unix does this work on? It doesn't work on Linux or Alpha/OSF. On Alpha/OSF, the `strip' command reports the following: strip: Error: 1.o contains relocation entries-- not stripped On Linux, you just get undefined symbol `main' or something like that. > 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' That's because `strip' stripped off all the symbols including the `main' symbol in your `.o' file. -- Fergus Henderson | "I have always known that the pursuit WWW: | of excellence is a lethal habit" PGP: finger fjh AT 128 DOT 250 DOT 37 DOT 3 | -- the last words of T. S. Garp. - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".