Compile/link multithreaded

A. Phillip Smith asmith@www.aeinc.com
Thu Mar 6 08:12:00 GMT 1997


> 
> 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:gunther.ebert@ixos-leipzig.de
> 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
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list