This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: How to make a Windows program using threads?
- To: "Emmanuel STAPF" <manus at eiffel dot com>
- Subject: Re: How to make a Windows program using threads?
- From: Mumit Khan <khan at nanotech dot wisc dot EDU>
- Date: Mon, 27 Sep 1999 20:15:54 -0500
- cc: "Cygwin at Sourceware dot Cygnus. Com" <cygwin at sourceware dot cygnus dot com>
"Emmanuel STAPF" <manus@eiffel.com> writes:
> Thanks for the answer, but my question was more related to how to compile
> it. For example on Windows using MSVC++ you need to compile with the -MD
> or -MT flag. Do you need to do the same with gcc on windows. I should
> mention that I'm using the `-mnocygwin' option in order to link against
^^^^^^^^^^ (you mean -mno-cygwin of course)
> Microsoft Runtime.
Mingw32 port uses only the multithreaded runtime (either CRTDLL or MSVCRT),
so -MT and -MD is implicit (ie., -MD -MT is on by default).
Currently, the C++ runtime is not thread-safe, but I'm planning to release
a runtime update soon that will fix that problem.
Currently, for both Cygwin and Mingw, you need to add -mwindows when
linking, which provides a few extra libraries and also changes the entry
point for Mingw32.
$ gcc -mno-cygwin -o foo.exe foo.c -v -mwindows
to see what happens.
Regards,
Mumit
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com