| www.delorie.com/archives/browse.cgi | search | 
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm | 
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> | 
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> | 
| List-Post: | <mailto:cygwin AT cygwin DOT com> | 
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> | 
| Sender: | cygwin-owner AT cygwin DOT com | 
| Mail-Followup-To: | cygwin AT cygwin DOT com | 
| Delivered-To: | mailing list cygwin AT cygwin DOT com | 
| Date: | Fri, 5 Jul 2002 16:09:15 -0400 (EDT) | 
| Message-Id: | <200207052009.g65K9Fr00451@new-york.lcs.mit.edu> | 
| X-Authentication-Warning: | new-york.lcs.mit.edu: decouto set sender to decouto AT lcs DOT mit DOT edu using -f | 
| From: | "Douglas S. J. De Couto" <decouto AT lcs DOT mit DOT edu> | 
| To: | cygwin AT cygwin DOT com | 
| Subject: | g++ global constructor bug? | 
| Reply-to: | decouto AT lcs DOT mit DOT edu | 
the following program doesn't work right with cygwin, it seems the
global object sh constructor is not being called.
--------------------
#include <stdio.h>
struct foobar {
  foobar(int i) { printf ("foobar(%d)\n", i); }
};
foobar sh(1);
int
main(int argc, char **argv) {
  foobar s(2);
}
--------------------
bash-2.05a$ g++ foo.cc
bash-2.05a$ a.exe 
foobar(2)
bash-2.05a$ 
i expected instead to see
foobar(1)
foobar(2)
i saw lots of stuff about DLLs etc., on the mailing list, but i am not
producing a DLL here.
$ g++ -dumpversion
2.95.3-5
-- 
Douglas S. J. De Couto    decouto AT lcs DOT mit DOT edu 
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
| webmaster | delorie software privacy | 
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |