Subject: RE: MSVCRT/threads
From: [email-masked] (Colin Peters)

19 Oct 1998 07:56:50 -0700
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/mixed;
	boundary="----=_NextPart_000_001B_01BDFB4F.0D51E160"
To: "Darren Cook" <[email-masked]>
Cc: "GNU-win32" <[email-masked]>

This is a multi-part message in MIME format.

------=_NextPart_000_001B_01BDFB4F.0D51E160
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Darren Cook <[email-masked]> wrote:

>I've installed EGCS 1.1 for i386-mingw32. My question is how do I tell the
>linker I'm using MSVCRT.DLL? I checked the FAQ and mailing list archives.
>I've included more details below. Thanks in advance for any suggestions,
>
>Darren
>
>
>I'm trying some multi-thread examples from the O'Reilly "win32
>multithreaded programming".
>
>The hello world program compiled first time, using CreateThread(). But when
>I changed it to use _beginthreadex() I get compile errors. I changed the
>example to include <process.h>. Now it works with Visual C++ 5 (once I
>remembered to tell it to use the multithreaded runtime library).
>
>But it still fails with EGCS. After reading the source for process.h I've
>added this line:
> #define __MSVCRT__ //For EGCS

Remove that line, the procedure I describe should do the equivalent for
you...

>Now it compiles but won't link. I found this in the readme file:
>
>  The default distribution links with and uses CRTDLL.DLL, which is
>
>guaranteed to be on *every* W95/NT system shipped. If there's
>  interest,
>I'll also upload the add-on to make it work with MSVCRT.DLL,
>  which is
>shipped with newer versions of W95/NT, as well as with MS
>  packages such
>as MS Explorer.

If you downloaded EGCS from Mumit's site reasonably recently (do a
gcc --version and if it reports
egcs-2.91.57 then I think you are alright) you have basically all you need
except for the proper specs file. Try replacing the specs file in (assuming
an install in D:\egcs\)

D:\egcs\lib\gcc-lib\i386-mingw32\egcs-2.91.57

with the attached specs file. Rename the old one specs.old, and rename the
attached file specs. This will link with msvcrt.dll and define __MSVCRT__
which changes things in a couple of header files.

Good luck,
Colin.

- Colin Peters - colin at fu.is.saga-u.ac.jp
- http://www.geocities.com/Tokyo/Towers/6162/index.html
- Go not to usenet for counsel, for it will say both
- 'yes' and 'no' and 'try another newsgroup'.

------=_NextPart_000_001B_01BDFB4F.0D51E160
Content-Type: application/octet-stream;
	name="specs.msvcrt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
	filename="specs.msvcrt"

------=_NextPart_000_001B_01BDFB4F.0D51E160--

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".