This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: problem with dynamic_cast


> -----Original Message-----
> From: Larry Hall (RFK Partners, Inc) [mailto:lhall@rfk.com]
> Sent: Friday, September 08, 2000 3:53 PM
> To: Fleischer, Karsten (K.); 'kris.thielemans@ic.ac.uk'
> Cc: Cygwin (E-mail)
> Subject: RE: problem with dynamic_cast
> 
> 
> Quite true.  -lm and -lc are not necessary with Cygwin.  The 
> support for 
> them are in the Cygwin DLL/lib which is linked in 
> automatically.  Linking
> with it twice (or more) guarantees a crash.  The simple 
> answer is, don't
> us -lm or -lc with Cygwin.
> 

Obviously if I create a program to work on cygwin, I'll be careful not to
add "-lm" to my link commands; however I quite often just port UNIX programs
to cygwin and then I may forget to remove "-lm" from the makefiles (or
oversee them). 

Just saying "dont use -lm" is a bit harsh on the developper; at the least we
should avoid delivering libm.a, so we will get a clear message "libm.a" not
found, that could be looked up in the FAQ quite simply. Now we just link
correctly but then crash misteriously ;-(

I think I remember someone already suggest a simple solution to the fact the
"-lm" crash under cygwin but it seems it was never implemented :-( :

Instead of having libm.a (and libc.a BTW) be a symbolic link to libcygwin.a,
just create one (two) empty libraries named "libm.a" and "libc.a"; linking
several times to these libraries would then essentially do nothing, which is
what we expect, instead of creating a "crashing" executable :-)

Maybe I'm just tood tosee the obvious problem this causes that will prevent
cygwin to be useful :-)

I know I should provide a patch, but I just don't know where to look :-)

Just my 2 cents,

	Bernard

--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel:	+33 (0) 1 47 68 80 80
Fax:	+33 (0) 1 47 88 97 85
e-mail:	dautrevaux@microprocess.com
		b.dautrevaux@usa.net
-------------------------------------------- 

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]