PRB: L2029 Errors When Building QuickWin Application

ID: Q103791


The information in this article applies to:


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:

Q102621 Microsoft Foundation Class Not Supported in QuickWin App

Additional query words:


Keywords          : kberrmsg kb16bitonly kbnokeyword kbMFC kbVC 
Version           : 1.0 1.5
Platform          : 
Issue type        : kbprb 

Last Reviewed: July 27, 1999