CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 15
  1. #1
    Join Date
    Oct 2007
    Posts
    21

    How can i configure visual studio to use _beginthreadex

    Hello everybody,

    I live in Brazil and I´m heaving problems with on a compilation C++ project. The message is:


    1>C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include\atlbase.h(4575) : error C3861: '_beginthreadex': identifier not found

    The header PROCESS.H be present in the main hearder file.

    My problem beguns when a change my Visual Studio 5 for Visual Studio 8.

    The C++ comand line is:

    /GL /I "C:\Samuel\20-SOFTools\Notepad++\SOFTools" /I "..\src\WinControls\AboutDlg" /I "..\..\scintilla\include" /I "..\include" /I "..\src\WinControls" /I "..\src\WinControls\ImageListSet" /I "..\src\WinControls\OpenSaveFileDialog" /I "..\src\WinControls\SplitterContainer" /I "..\src\WinControls\StaticDialog" /I "..\src\WinControls\TabBar" /I "..\src\WinControls\ToolBar" /I "..\src\MISC\Process" /I "..\src\ScitillaComponent" /I "..\src\MISC" /I "..\src\MISC\SysMsg" /I "..\src\WinControls\StatusBar" /I "..\src" /I "..\src\WinControls\StaticDialog\RunDlg" /I "..\src\tinyxml" /I "..\src\WinControls\ColourPicker" /I "..\src\MISC\RegExt" /I "..\src\WinControls\TrayIcon" /I "..\src\WinControls\shortcut" /I "..\src\WinControls\Grid" /I "..\src\WinControls\ContextMenu" /I "..\src\MISC\PluginsManager" /I "..\src\WinControls\Preference" /I "..\src\WinControls\WindowsDlg" /I "..\src\WinControls\TaskList" /I "..\src\WinControls\DockingWnd" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_VC80_UPGRADE=0x0710" /D "_AFXDLL" /D "_ATL_DLL" /D "_MBCS" /FD /EHa /MDd /Fo"Debug\\" /Fd"Debug\vc90.pdb" /W0 /c /Zi /clr /Gz /TP /errorReportrompt

    The link comand line is:

    /VERBOSE:LIB /OUT:"Debug/notepadPlus_Debug.exe" /VERSION:1.0 /INCREMENTAL /MANIFEST /MANIFESTFILE:"Debug\notepadPlus_Debug.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /TLBID:5 /DEBUG /ASSEMBLYDEBUG /PDB:"Debug/notepadPlus.pdb" /SUBSYSTEM:WINDOWS /LTCG /DYNAMICBASE:NO /FIXED:No /MACHINE:X86 /CLRTHREADATTRIBUTE:MTA /ERRORREPORT:PROMPT comctl32.lib shlwapi.lib shell32.lib

    Please, I realy need help. I did everything I know ...

    Sorry by poor english

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: How can i configure visual studio to use _beginthreadex

    Add Process.h to your stdafx.h file.

    Change your runtime library from /MDd to /MTd

  3. #3
    Join Date
    Oct 2007
    Posts
    21

    Re: How can i configure visual studio to use _beginthreadex

    Friend, i tried exactly you sugest, but de error message remains ...

  4. #4
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: How can i configure visual studio to use _beginthreadex

    I would recommend creating a new ATL project and compare its settings with what you have.

    I've ported several projects that use _beginthreadex to VC9 without any issues, so I'm certain it's possible.

  5. #5
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: How can i configure visual studio to use _beginthreadex

    If process.h is included, the only other thing that has to be done, in order to work, is using a multi-threaded version of the CRT.
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  6. #6
    Join Date
    Oct 2007
    Posts
    21

    Re: How can i configure visual studio to use _beginthreadex

    So, I need konw more about CRT

    Do you can help me or show me a link to learn about ?

  7. #7
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: How can i configure visual studio to use _beginthreadex

    Quote Originally Posted by SNArruda
    So, I need konw more about CRT

    Do you can help me or show me a link to learn about ?
    I answered that in post #2 already.

    Code:
    Change your runtime library from /MDd to /MTd
    Look at your linker settings and replace /MDd with /MTd.

  8. #8
    Join Date
    Oct 2007
    Posts
    21

    Re: How can i configure visual studio to use _beginthreadex

    I Did it, but the problem remains ...

    C/C++ Command line is:

    /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_VC80_UPGRADE=0x0710" /D "_ATL_DLL" /D "_MBCS" /Gm /EHsc /RTC1 /MTd /Fo"Debug\\" /Fd"Debug\vc90.pdb" /W0 /c /Zi /Gz /TP /errorReportrompt

  9. #9
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: How can i configure visual studio to use _beginthreadex

    Are you compiling from the command line?

  10. #10
    Join Date
    Oct 2007
    Posts
    21

    Re: How can i configure visual studio to use _beginthreadex

    No, but it show all options i choise at Visual Studio. So, I sent to you know more about my actual configuration ...

    Maybe the problem be other assigning ...

  11. #11
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: How can i configure visual studio to use _beginthreadex

    If you are using a stdafx.h file, please post its contents.

  12. #12
    Join Date
    Oct 2007
    Posts
    21

    Re: How can i configure visual studio to use _beginthreadex

    I don´t use it ...

    I set to "Not Using Precompiled Headers"

  13. #13
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: How can i configure visual studio to use _beginthreadex

    Okay. I've always used them - never had the trouble you are describing.

    You may want to create a new Win32 console project, add #include <process.h> to the header, change the linker to /MTd and then make a _beginthreadex call inside main.

    When it works compare the settings with your project settings.

  14. #14
    Join Date
    Oct 2007
    Posts
    21

    Re: How can i configure visual studio to use _beginthreadex

    Hi, you don´t believe ...

    I put the path C:\Program Files\Microsoft Visual Studio 9.0\VC\include in Additional include directories and the problem is resolved.

    the question: Wy the path is not default to Visual Studio and were is must be set up.

  15. #15
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: How can i configure visual studio to use _beginthreadex

    Quote Originally Posted by SNArruda
    Hi, you don´t believe ...

    I put the path C:\Program Files\Microsoft Visual Studio 9.0\VC\include in Additional include directories and the problem is resolved.

    the question: Wy the path is not default to Visual Studio and were is must be set up.
    It probably got changed by some user somewhere along the line.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured