From: colin AT fu DOT is DOT saga-u DOT ac DOT jp (Colin Peters) Subject: RE: MSVCRT/threads 19 Oct 1998 07:56:50 -0700 Message-ID: <001e01bdfb03$9e08ea60$fa173185.cygnus.gnu-win32@gbird0.fu.is.saga-u.ac.jp> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_001B_01BDFB4F.0D51E160" To: "Darren Cook" Cc: "GNU-win32" 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 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 . 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" KmFzbToKCgoqYXNtX2ZpbmFsOgoKCipjcHA6Ci1yZW1hcCAlKGNwcF9jcHUpICV7cG9zaXg6LURf UE9TSVhfU09VUkNFfQoKKmNjMToKJShjYzFfc3BlYykgCgoqY2MxcGx1czoKCgoqZW5kZmlsZToK CgoqbGluazoKJXttd2luZG93czotLXN1YnN5c3RlbSB3aW5kb3dzfSAle21kbGw6LS1kbGwgLWUg X0RsbE1haW5DUlRTdGFydHVwQDEyfQoKKmxpYjoKJXttd2luZG93czotbHVzZXIzMiAtbGdkaTMy IC1sY29tZGxnMzJ9IC1sa2VybmVsMzIgLWxhZHZhcGkzMiAtbHNoZWxsMzIKCipsaWJnY2M6Ci1s bWluZ3czMiAtbGdjYyAtbG1vbGRuYW1lIC1sbXN2Y3J0Cgoqc3RhcnRmaWxlOgole21kbGw6ZGxs Y3J0MiVPJXN9ICV7IW1kbGw6Y3J0MiVPJXN9Cgoqc3dpdGNoZXNfbmVlZF9zcGFjZXM6CgoKKnNp Z25lZF9jaGFyOgole2Z1bnNpZ25lZC1jaGFyOi1EX19DSEFSX1VOU0lHTkVEX199CgoqcHJlZGVm aW5lczoKLURpMzg2IC1EX1dJTjMyIC1EV0lOMzIgLURfX1dJTjMyX18gICAtRF9fTUlOR1czMl9f IC1EX19NU1ZDUlRfXyAtRFdJTk5UICAtRF9YODZfPTEgLURfX1NURENfXz0xICAtRF9fc3RkY2Fs bD1fX2F0dHJpYnV0ZV9fKChfX3N0ZGNhbGxfXykpICAgLURfX2NkZWNsPV9fYXR0cmlidXRlX18o KF9fY2RlY2xfXykpICAgLURfX2RlY2xzcGVjKHgpPV9fYXR0cmlidXRlX18oKHgpKSAgIC1Bc3lz dGVtKHdpbm50KSAtQWNwdShpMzg2KSAtQW1hY2hpbmUoaTM4NikKCipjcm9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h cmNoPWk0ODZ9ICV7bW5vLXBlbnRpdW06LW1jcHU9aTQ4NiAtbWFyY2g9aTQ4Nn0gJXttcGVudGl1 bTotbWNwdT1wZW50aXVtfSAle21uby1wZW50aXVtcHJvOi1tY3B1PXBlbnRpdW19ICV7bXBlbnRp dW1wcm86LW1jcHU9cGVudGl1bXByb319Cgo= ------=_NextPart_000_001B_01BDFB4F.0D51E160-- - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".