Article View: borland.public.cppbuilder.nativeapi
Article #8973Re: _beginthreadex
From: Arthur Jelsma
Date: Wed, 25 Aug 2004 18:10
Date: Wed, 25 Aug 2004 18:10
76 lines
3624 bytes
3624 bytes
Thanks for your help. I created a new multithreaded
program and it worked fine.
In point of fact I was not attempting to gain anything
by using the pragma. I was simply using the example given
to see all of what was involved.
"Ed Mulroy [TeamB]" <dont_email_me@invalid.com> wrote:
>I do not know what you expect to gain from using the checkoption
>pragma. If you told the Console Wizard to create a multi-threaded
>program then the multithreaded libraries will be used. If you did not
>then they would not. The pragma is a compile time item but you are
>using it in an attempt to check link time behavior.
>
>Either create a new project in which you specify to the Console Wizard
>that the program is to be console mode, multi-threaded or modify the
>project file.
>
>
>To modify the project file:
>
>Open the project file in an editor while the IDE is not running.
>
>Look for the options to the compiler and make sure they include one
>of -tWM or -WM and that one of -tWC, -tWCR, -WC or -WCR is to the
>right of it.
>
>Look for the list of libraries and look for cw32.lib or cw32i.lib If
>one of them is found, substitute cw32mt.lib or cw32mti.lib
>respectively.
>
>cw32mt.lib matches with -tWC or -WC
>cw32mti.lib matches with -tWCR or -WCR or if one of -tWR or -WR is
>used to the left of -tWC or -WC
>
>All -tW* options are exact equivalents for corresponding -W* options.
>Options may also begin with a slash ('/') instead of a dash ('-').
>
>-tWM, /tWM, -WM, /WM Multi-threaded
>-tWR, /tWR, -WR, /WR Dynamic linked
>-tWC, /tWC, -WC, /WC Windows console mode
>-tWCR, /tWCR, -WCR. /WCR Windows console mode, dynamic linked
>
>cw32.lib Single threaded library
>cw32i.lib Single threaded, dynamic linked library
>cw32mt.lib Multi threaded library
>cw32mti.lib Multi threaded, dynamic linked library
>
>The option with the 'C' specifies console mode and should be to the
>right of the others. Options to the right can over-ride those to the
>left. Option placement is important because the other -tW*, /tW*, -W*
>or /W* options imply GUI mode.
>
>Also check that the linker options include /ap or -ap (console mode)
>and not /aa or -aa (gui mode).
>
>. Ed
>
>> Arthur Jelsma wrote in message
>> news:412cbca6$1@newsgroups.borland.com...
>>
>> I am writing a multithreaded console app with BCB5 Pro.
>>
>> I used the example in the documentation for _beginthreadex
>> but I keep getting unresolved external errors for the
>> _beginthreadex function.Iamalsogettingaproblemwith
>> the "#pragma checkoption -tWM" option. I tried linking with
>> the libraries that contain the external but no luck.
>>
>> Any hints as to what I might do to resolve this. Thanks for
>> any help you can give
>> me.
>
>
Technical Details
Message-ID:
<412cd61a$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<412cbca6$1@newsgroups.borland.com> <412cc70c@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,a2dfc88c750b51e5 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Arthur Jelsma" <jelsma@wapa.gov> Sender: "Arthur Jelsma" <jelsma@wapa.gov> Reply-To: "Arthur Jelsma" <jelsma@wapa.gov> Subject: Re: _beginthreadex Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 64.33.255.190 References: <412cbca6$1@newsgroups.borland.com> <412cc70c@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <412cd61a$1@newsgroups.borland.com> Date: 25 Aug 2004 11:10:34 -0700 X-Trace: newsgroups.borland.com 1093457434 207.105.83.66 (25 Aug 2004 11:10:34 -0700) Lines: 77 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail