Tech Support > Microsoft Windows > Development Resources > odd frustrating error "_beginthreadex" in MSVC++ 6.0
odd frustrating error "_beginthreadex" in MSVC++ 6.0
Posted by TheTempest on September 28th, 2003


Hi,

I have this error "undefined symbol" _beginthreadex in my program when
i have already included the <process.h> include file...

I'm using a simple win32 project space. Any ideas?

~Thanks~

Posted by Patrick Philippot on September 28th, 2003


TheTempest wrote:
Did you have a look at Process.h ? The definition of _beginthreadex is
preceded with #ifdef _MT which can be either defined explicitly (wrong
choice) or better defined by activating the /MT switch of the compiler.
Which will be done automatically if you go to Project | Settings | C/C++
| Code generation | Use run-time library and select the multithreaded
version of the runtime library.

Excerpt of the documentation:

"To use _beginthread or _beginthreadex, the application must link with
one of the multithreaded C run-time libraries."

Regards.

--
Patrick Philippot - Microsoft MVP [.Net]
MainSoft Consulting Services
www.mainsoft.xx
(replace .xx with .fr when replying by e-mail)



Posted by Jussi Jumppanen on September 29th, 2003


Patrick Philippot wrote:

And the only other thing to remember is never mix and match the
runtime libraries. For example if you have an exe that links to
a couple of static libraries, then the exe and static libs all
need to use the same version of the C runtime library.

Jussi Jumppanen
Author of: Zeus for Windows (All new version 3.90 out now)
"The C/C++, Cobol, Java, HTML, Python, PHP, Perl programmer's editor"
Home Page: http://www.zeusedit.com

Posted by TheTempest on September 29th, 2003


sorry,

I know that seemed like a stupid question, i did do that accualy
before you posted and i felt kinda stupid as i figured it out. It's
just that i'm used to CreateThread() and no the old c librarays.

Thanks for the reply.


"Patrick Philippot" <patrick.philippot@mainsoft.xx> wrote in message news:<bl64p3$2iln$1@biggoron.nerim.net>...