including atlbase

Hello,

i am currentlyworking on porting a lib project from VC6 to VC2005.
in one of my h files, i include <atlbase.h> in order to use CComBSTR class.
while compiling the project i get the following error, regarding this include:

c:\program files\microsoft visual studio 8\vc\atlmfc\include\atlbase.h(4360) : error C3861: '_beginthreadex': identifier not found

i tried to enable _ATL_MIN_CRT in the project definitions, but it did not help.
any idea how to solve it?

Thanks!

[577 byte] By [Kfironit] at [2007-12-16]
# 1
Try specifying /MT as compiler option.

Thanks,
Eugene

EugeneNalimov at 2007-9-9 > top of Msdn Tech,Visual C++,Visual C++ General...
# 2
How do I specify /MT as a compiler option?
MikeR2000 at 2007-9-9 > top of Msdn Tech,Visual C++,Visual C++ General...
# 3
I am not sure if this is correct for what the previous poster said, but...:

There are supposedly numerious compile options and optimizations which you may use when you compile. To use them, try opening the command prompt available in the Microsoft Visual C++ start-menu folder.

to list compiler options, etc:
- type "cl /?" into the command prompt, then press enter

to use compiler options, etc:
- type "cl ", then the text coreasponding to your option choice, then the name of the file to be compiled (enclose with quotes if file or path name has spaces), then press enter
This should compile the file with the added effect of the compile option, "/MT" being one of those listed. However, problems compile-ing may occur if your code files are too dependant on the IDE environment of Visual Studios.
(note: quotes are not used when typeing the above into the command prompt)

(note: "file name" above includes the path to the file, such as "C:\etc\code.cpp" for example)

forum389 at 2007-9-9 > top of Msdn Tech,Visual C++,Visual C++ General...