Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: jgkarman Date: Tue, 11 Sep 2001 07:55:37 GMT Message-ID: <20010911.7553700@linux.local> Subject: What flags should I use, -mthread, -mthreads, -lmmalloc, .... ? To: cygwin AT cygwin DOT com X-Mailer: Mozilla/3.0 (compatible; StarOffice/5.1; Linux) X-Priority: 3 (Normal) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id CAA02315 Hello, I'm trying to port a program to Windows95, using cygwin 1.3.2. It consists of a GUI displaying data that are calculated by a background process, and uses templates in a multithreaded environment. It keeps crashing with a segfault when allocating memory for a template, either my own or standard templates like std::vector. BTW, the same program runs flawlessly for more than a week under linux. I tried with various compiler and linker flags, but nothing worked until now. Through the mingw users archives I found that it is necessary to use -mthreads for both compiling and linking, does this also work for cygwin? The linker also recognises -mthread, but the compiler doesn't. And in this (cygwin) list somebody (if I remember well it was the same person) suggested using -lmmalloc to prevent memory errors. The only thing that I achieved by using these flags is that it takes longer before it crashes: without mthreads or mmaloc after 5 minutes, with mthreads it may take an hour, and I do not remember what the added effect of lmmalloc was. I looked in the users manual, but found no information for either mmaloc or -mthread(s), nor did I find any other hints for using templates in a multithreaded program. Can anyone tell me what more I could try, or better yet: what the magical flags are to make everything work? Thanks in advance for any help. Regards, Geert Karman -- 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/