MFC Errors :: C++

This is a discussion on MFC Errors :: C++ within the C++ Programming forums, part of the General Programming Boards category; Hi. I am studying MFC from Prosise's book. I read the first three chapters, but have not started implementing any ...

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348

    MFC Errors :: C++

    Hi.

    I am studying MFC from Prosise's book. I read the first three chapters, but have not started implementing any sample until today. Visual C++ output three errors with the "Hello MFC" program.

    MFC-Hello error LNK2019: unresolved external symbol __beginthreadex referenced in function "public: int __thiscall CWinThread::CreateThread(unsigned long,unsigned int,struct _SECURITY_ATTRIBUTES *)" (?CreateThread@CWinThread@@QAEHKIPAU_SECURITY_ATTR IBUTES@@@Z)

    -----

    MFC-Hello error LNK2019: unresolved external symbol __endthreadex referenced in function "void __stdcall AfxEndThread(unsigned int,int)" (?AfxEndThread@@YGXIH@Z)

    -----

    MFC-Hello fatal error LNK1120: 2 unresolved externals

    -----

    Does anyone know what those errors are about? I copied *exactly* what Promise wrote in his book.

    Thanks,
    Kuphryn

  2. #2
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    Why don't u just post the code and see what people can do??

  3. #3
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,138
    Does anyone know what those errors are about? I copied *exactly* what Promise wrote in his book.
    Your code is correct, your project settings are somewhat off. Go to settings and set 'Link MFC static' in the combobox.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  4. #4
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Thanks.

    I right-clicked on the soure filea and changed from single-thread to multi-thread /MD through option.

    The code works great now.

    Kuphryn

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Creating and Empty MFC project in Visual Studio?
    By Swerve in forum Windows Programming
    Replies: 7
    Last Post: 11-01-2008, 04:43 PM
  2. non-MFC DLL with MFC app question.
    By Kempelen in forum Windows Programming
    Replies: 10
    Last Post: 08-20-2008, 07:11 AM
  3. Windows, MFC, .NET, C++ ???
    By alpha in forum Windows Programming
    Replies: 8
    Last Post: 08-07-2006, 02:31 PM
  4. MFC support in ATL project
    By Arkanos in forum Windows Programming
    Replies: 2
    Last Post: 01-29-2006, 04:15 PM
  5. Windows Forms and/or MFC [But definately not win32!] questions
    By Robert_Sitter in forum Windows Programming
    Replies: 2
    Last Post: 12-03-2005, 08:28 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21