Subject: Re: Compile/link multithreaded
From: [email-masked] ("A. Phillip Smith")

6 Mar 1997 12:42:00 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Original-To: [email-masked] (Gunther Ebert)
Original-Cc: [email-masked]
In-Reply-To: <[email-masked]> from "Gunther Ebert" at Mar 6, 97 07:05:17 am
X-Mailer: ELM [version 2.4 PL24]
Original-Sender: [email-masked]

> 
> A. Phillip Smith wrote:
> > 
> > Does anyone know how to compile cygwin32 applications with gcc
> > such that they can link with libcmt.lib (multithreaded) instead of
> > single threaded libc.lib ?
> 
> Use mingw32. Using this package you always link with crtdll.dll
> which is a C library with multithread support (but you will lose
> any UNIX support).
> BTW, using the Win32 API function CreateThread you can always
> create multithreaded applications, no matter what C library you
> are using, but you have to use some C library functions that
> access global data internally (like strtok) very carefully.
> 
> -- 
> 
> Gunther Ebert
> iXOS Anwendungs-Software GmbH
> Angerstrasse 40-42
> D-04177 Leipzig
> 
> Phone : +49 341 48503-0
> Fax   : +49 341 48503-99
> E-mail: mailto:[email-masked]
> www   : http://www.ixos-leipzig.de
> 
Thanks, but having Unix support is the whole point. I want to
make a cywin32 application run as a service. I think I can make an
application using VCC++ and have the cygwin portion link as a DLL,
but I was hoping there was a way to do this directly from gcc. I
also tried the 

	gcc -nostdlib (and/or -nodefaultlib ) ... -Wl,-lcmt

This didn't work either. The gcc seems to ALWAYS link with libc.lib
regardless of options. It seems from your response, that you've 
tried similar cygwin32 options to no avail, or did I miss something
in FAQ ?
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".