BUG: MFC Library Build Fails with NOSTRICT DefinedLast reviewed: July 22, 1997Article ID: Q117795 |
1.50
WINDOWS
kbprg kbbuglist
The information in this article applies to:
SYMPTOMSSpecifying OPT="/DNOSTRICT" when building the MFC Library version 2.5 variants generates the following message:
oledobj2.cpp(706) : error C2664: 'CallWindowProc' : cannot convert parameter 1 from 'long (__far __pascal *)(unsigned int ,unsigned int ,unsigned int ,long )' to 'int (__far __pascal *)(void )' CAUSEThe problem is caused by the declaration of afxPrevClipboardWndProc (OLEDOBJ2.CPP, line 692). The variable is declared like this:
extern WNDPROC NEAR _afxPrevClipboardWndProc;That variable is passed as the first argument to the CallWindowProc in line 706. The CallWindowProc is declared in the WINDOWS.H file like this:
#ifdef STRICT LRESULT WINAPI CallWindowProc(WNDPROC, HWND, UINT, WPARAM, LPARAM); #else LRESULT WINAPI CallWindowProc(FARPROC, HWND, UINT, WPARAM, LPARAM); #endifIn the case that STRICT is not defined, the _afxPrevClipboardWndProc variable does not match the type of the first argument to CallWindowProc, and the error is generated.
RESOLUTIONModify line 692 in OLEDOBJ2.CPP to provide the correct declaration by using preprocessor directives. For example:
#ifdef STRICT WNDPROC NEAR _afxPrevClipboardWndProc; #else FARPROC NEAR _afxPrevClipboardWndProc; #endif STATUSMicrosoft has confirmed this to be a bug in the Microsoft Foundation Classes for Windows, version 2.5. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
|
Additional reference words: NOSTRICT library build 1.50 2.50
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |