Article View: borland.public.cppbuilder.nativeapi
Article #8971Re: _beginthreadex
From: Ed Mulroy [TeamB]
Date: Wed, 25 Aug 2004 17:06
Date: Wed, 25 Aug 2004 17:06
64 lines
3383 bytes
3383 bytes
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:
<412cc70c@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<412cbca6$1@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: "Ed Mulroy [TeamB]" <dont_email_me@invalid.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <412cbca6$1@newsgroups.borland.com> Subject: Re: _beginthreadex Date: Wed, 25 Aug 2004 13:06:12 -0400 Lines: 66 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 12.161.27.41 Message-ID: <412cc70c@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1093453580 12.161.27.41 (25 Aug 2004 10:06:20 -0700) X-Authenticated-User: edmulroy Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail