Mail Archives: cygwin/2001/09/11/02:58:24
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/
- Raw text -