public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* How to make a Windows program using threads?
@ 1999-09-24 17:01 Emmanuel STAPF
  1999-09-27 12:28 ` Mumit Khan
  1999-09-30 23:42 ` Emmanuel STAPF
  0 siblings, 2 replies; 8+ messages in thread
From: Emmanuel STAPF @ 1999-09-24 17:01 UTC (permalink / raw)
  To: Cygwin@Sourceware. Cygnus. Com

What are the options to make a windows compliant program using Windows
Threads? I searched the web page but could not find any info on it.

Thanks in advance

Regards,
Manu


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to make a Windows program using threads?
  1999-09-24 17:01 How to make a Windows program using threads? Emmanuel STAPF
@ 1999-09-27 12:28 ` Mumit Khan
  1999-09-27 15:02   ` Emmanuel STAPF
  1999-09-30 23:42   ` Mumit Khan
  1999-09-30 23:42 ` Emmanuel STAPF
  1 sibling, 2 replies; 8+ messages in thread
From: Mumit Khan @ 1999-09-27 12:28 UTC (permalink / raw)
  To: Emmanuel STAPF; +Cc: Cygwin@Sourceware. Cygnus. Com

"Emmanuel STAPF" <manus@eiffel.com> writes:
> What are the options to make a windows compliant program using Windows
> Threads? I searched the web page but could not find any info on it.

Ah, how about a book on windows programming? CreateThread is a good to
start looking.

BTW, Cygwin is not yet thread-safe, so take care if you're going to do
multi-threaded programming with Cygwin.

Regards,
Mumit


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: How to make a Windows program using threads?
  1999-09-27 12:28 ` Mumit Khan
@ 1999-09-27 15:02   ` Emmanuel STAPF
  1999-09-27 18:16     ` Mumit Khan
  1999-09-30 23:42     ` Emmanuel STAPF
  1999-09-30 23:42   ` Mumit Khan
  1 sibling, 2 replies; 8+ messages in thread
From: Emmanuel STAPF @ 1999-09-27 15:02 UTC (permalink / raw)
  To: Mumit Khan; +Cc: Cygwin@Sourceware. Cygnus. Com

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
Microsoft Runtime.

Thanks in advance
Regards,
Manu


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to make a Windows program using threads?
  1999-09-27 15:02   ` Emmanuel STAPF
@ 1999-09-27 18:16     ` Mumit Khan
  1999-09-30 23:42       ` Mumit Khan
  1999-09-30 23:42     ` Emmanuel STAPF
  1 sibling, 1 reply; 8+ messages in thread
From: Mumit Khan @ 1999-09-27 18:16 UTC (permalink / raw)
  To: Emmanuel STAPF; +Cc: Cygwin@Sourceware. Cygnus. 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to make a Windows program using threads?
  1999-09-27 18:16     ` Mumit Khan
@ 1999-09-30 23:42       ` Mumit Khan
  0 siblings, 0 replies; 8+ messages in thread
From: Mumit Khan @ 1999-09-30 23:42 UTC (permalink / raw)
  To: Emmanuel STAPF; +Cc: Cygwin@Sourceware. Cygnus. 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to make a Windows program using threads?
  1999-09-27 12:28 ` Mumit Khan
  1999-09-27 15:02   ` Emmanuel STAPF
@ 1999-09-30 23:42   ` Mumit Khan
  1 sibling, 0 replies; 8+ messages in thread
From: Mumit Khan @ 1999-09-30 23:42 UTC (permalink / raw)
  To: Emmanuel STAPF; +Cc: Cygwin@Sourceware. Cygnus. Com

"Emmanuel STAPF" <manus@eiffel.com> writes:
> What are the options to make a windows compliant program using Windows
> Threads? I searched the web page but could not find any info on it.

Ah, how about a book on windows programming? CreateThread is a good to
start looking.

BTW, Cygwin is not yet thread-safe, so take care if you're going to do
multi-threaded programming with Cygwin.

Regards,
Mumit


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* How to make a Windows program using threads?
  1999-09-24 17:01 How to make a Windows program using threads? Emmanuel STAPF
  1999-09-27 12:28 ` Mumit Khan
@ 1999-09-30 23:42 ` Emmanuel STAPF
  1 sibling, 0 replies; 8+ messages in thread
From: Emmanuel STAPF @ 1999-09-30 23:42 UTC (permalink / raw)
  To: Cygwin@Sourceware. Cygnus. Com

What are the options to make a windows compliant program using Windows
Threads? I searched the web page but could not find any info on it.

Thanks in advance

Regards,
Manu


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: How to make a Windows program using threads?
  1999-09-27 15:02   ` Emmanuel STAPF
  1999-09-27 18:16     ` Mumit Khan
@ 1999-09-30 23:42     ` Emmanuel STAPF
  1 sibling, 0 replies; 8+ messages in thread
From: Emmanuel STAPF @ 1999-09-30 23:42 UTC (permalink / raw)
  To: Mumit Khan; +Cc: Cygwin@Sourceware. Cygnus. Com

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
Microsoft Runtime.

Thanks in advance
Regards,
Manu


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1999-09-30 23:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-24 17:01 How to make a Windows program using threads? Emmanuel STAPF
1999-09-27 12:28 ` Mumit Khan
1999-09-27 15:02   ` Emmanuel STAPF
1999-09-27 18:16     ` Mumit Khan
1999-09-30 23:42       ` Mumit Khan
1999-09-30 23:42     ` Emmanuel STAPF
1999-09-30 23:42   ` Mumit Khan
1999-09-30 23:42 ` Emmanuel STAPF

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).