Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6215079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:59:28+00:00 2026-05-24T06:59:28+00:00

In MFC, wWinMain is defined in appmodul.cpp . This file is built into mfc90ud.dll

  • 0

In MFC, wWinMain is defined in appmodul.cpp. This file is built into mfc90ud.dll from what I can see. However, when I run my application, the call stack shows MyApplication.exe!wWinMain. How has it taken the wWinMain function that was exported in appmodul.obj and placed it in my application?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T06:59:29+00:00Added an answer on May 24, 2026 at 6:59 am

    Right-click your project in the Solution Explorer window, Properties, Linker, Command Line. Type /verbose in the “Additional Options” box. Rebuild your project. The Output window now shows a trace of where the linker found a symbol. Search it for “winmain” to find this:

    1>    Searching c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\lib\mfcs90ud.lib:
    1>      Found _wWinMain@16
    1>        Referenced in msvcrtd.lib(wcrtexew.obj)
    1>        Loaded mfcs90ud.lib(appmodul.obj)
    

    Note the library name, mfcs90ud.lib is a static link library. If you search for “mfcs90ud.lib” then you can also see how that library got referenced:

    1>Starting pass 1
    1>Processed /DEFAULTLIB:mfc90ud.lib
    1>Processed /DEFAULTLIB:mfcs90ud.lib
    1>Processed /DEFAULTLIB:msvcrtd.lib
    etc..
    

    If you search the MFC source code for “mfcs”, you’ll find how this /defaultlib option got injected. From afx.h:

                #ifdef _DEBUG
                        #pragma comment(lib, "mfc" _MFC_FILENAME_VER "ud.lib")
                        #pragma comment(lib, "mfcs" _MFC_FILENAME_VER "ud.lib")
                #else
                        #pragma comment(lib, "mfc" _MFC_FILENAME_VER "u.lib")
                        #pragma comment(lib, "mfcs" _MFC_FILENAME_VER "u.lib")
                #endif
    

    Long story short, an MFC app links two libraries. Mfc90u.lib is the import library for the DLL version of MFC. Mfcs90u.lib is a static link library that contains the bits that get linked into your executable. Including WinMain().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

MFC File: winctrl4.cpp (C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\src\mfc) CString CRichEditCtrl::GetSelText() const { ASSERT(::IsWindow(m_hWnd)); CHARRANGE
Using MFC's TRACE macro or OutputDebugString from the Windows API, you can write to
This is my first MFC application away from VC6, and I feel a little
Can MFC applications with Ribbon toolbars built under VS2010 be run on versions of
MFC is failing to launch my dialog boxes, it seems, because it can't find
c++ mfc if CHttpConnection::OpenRequest returns a null what can I use to get the
I've got an existing simple MFC app that the user specifies the input file,
MFC CArray was Serialized and saved to a database. I need to read this
How can I create child dialog from an existing dialog? Declaration(global scope) HINSTANCE hInst;
I'm working on an MFC Visual C++ project. As I understand from MSDN ,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.