PRB: L2029 Errors When Building QuickWin ApplicationLast reviewed: July 22, 1997Article ID: Q103791 |
The information in this article applies to:
SYMPTOMSWhen 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 CAUSEThe application was built using the Microsoft Foundation Class (MFC) Library for Windows. Use of Windows MFC libraries is not supported in QuickWin applications.
RESOLUTIONIf 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 INFORMATIONThe 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]; } REFERENCESFor 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
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |