Problem -- intelliisense: # error directive: Please use the/MD switch for _ AFXDLL builds

Source: Internet
Author: User

 

My single-document project of MFC has an incorrect question. This error occurs after the LoadStringW function of the CString class is used, but it is also wrong after being annotated:

1 CString str;
2 str = "video monitoring ";
3 pDC-> TextOutW (50, 20, str );
4
5 str. LoadStringW (IDS_STRING312 );
6 pDC-> TextOutW (300, 20, str );

 

Follow the Netizen's method: Modify the following settings: project-> properties-> Configuration properties-> c/c ++-> code generation-> Runtime Library-> multi-thread debugging DLL (/MDd ).

Still failed to solve...

 

The problem is found here:

1 void CTextApp: PreLoadState ()
2 {
3 BOOL bNameValid;
4 CString strName;
5 bNameValid = strName. LoadString (IDS_EDIT_MENU );
6 ASSERT (bNameValid); // This line does not run, but debug is not available here, but I cannot think of any problems or change them.
7 GetContextMenuManager ()-> AddMenu (strName, IDR_POPUP_EDIT );
8 bNameValid = strName. LoadString (IDS_EXPLORER );
9 ASSERT (bNameValid );
10 GetContextMenuManager ()-> AddMenu (strName, IDR_POPUP_EXPLORER );
11}

 

Experts can solve the problem ~~~

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.