PRB: L2029 Errors When Building QuickWin Application

Last reviewed: July 22, 1997
Article ID: Q103791

The information in this article applies to:
  • The Microsoft Foundation Classes (MFC) included with:

        - Microsoft Visual C++ for Windows, versions 1.0, 1.5
    

SYMPTOMS

When building a QuickWin application, the following linker errors may occur:

   error L2029: 'GETFILETITLE' :   unresolved external
   error L2029: 'GETFILETITLE' :   unresolved external
   error L2029: 'PRINTDLG' :       unresolved external
   error L2029: 'GETOPENFILENAME': unresolved external
   error L2029: 'REGSETVALUE' :    unresolved external
   error L2029: 'DRAGACCEPTFILES' :unresolved external
   error L2029: 'REGQUERYVALUE' :  unresolved external
   error L2029: 'GETSAVEFILENAME' :unresolved external
   error L2029: 'DRAGFINISH' :     unresolved external
   error L2029: 'DRAGQUERYFILE' :  unresolved external
   error L2029: 'CHOOSECOLOR' :    unresolved external

CAUSE

The application was built using the Microsoft Foundation Class (MFC) Library for Windows. Use of Windows MFC libraries is not supported in QuickWin applications.

RESOLUTION

If your application does not use the Microsoft Foundation Classes, turn off the use of these libraries. To do this, select the Options menu, choose Project, and clear the Use Microsoft Foundation Classes check box in the Project Options dialog box.

QuickWin was not originally designed for use with the Microsoft Foundation Classes. If you should need to use MFC with your QuickWin application, you may want to review the information in the Microsoft Knowledge Base article referred to above.

MORE INFORMATION

The L2029 errors are caused by code in the Windows version of the Microsoft Foundation Class Library, which references functions in the COMMDLG.LIB and SHELL.LIB import libraries. The references to the symbols could be resolved if you select these two libraries in the Linker Options dialog box, under the Windows Libraries category. However, if you decide to link with these libraries to resolve the problem, be aware that your program may be including a lot of code that may never get used.

Linking with code in the Windows version of the MFC library often brings in code for a CWinApp object, which references the functions in the COMMDLG and SHELL libraries. It is recommended that you not link with the MFC library for Windows but instead try linking with the MS-DOS version of MFC if possible. Please refer to the Microsoft KB article mentioned above for more information.

Sample Code

   // The code below can cause the L2029 errors listed above if
   // built with the MFC debug libraries and QuickWin.
   void main()
   {
      int * ptr = new int[1];
   }

REFERENCES

For additional information, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q102621
   TITLE     : Microsoft Foundation Class Not Supported in QuickWin
               App
 

	
	


Keywords : kb16bitonly kberrmsg MfcMisc
Technology : kbmfc
Version : 1.0 1.5
Issue type : kbprb


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 22, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.