PRB: C2061 Errors When Compiling for Macintosh Target

Last reviewed: November 19, 1995
Article ID: Q139603
The information in this article applies to:

  - Microsoft Visual C++ 2.0 Cross-Development Edition for Macintosh

SYMPTOMS

When you compile a project for a Macintosh target, the following error messages occur:

   C:\MSVC20\MFC\INCLUDE\afxwin.h(1908) : error C2061: syntax error :
                                                identifier 'LPSCROLLINFO'

   C:\MSVC20\MFC\INCLUDE\afxwin.h(1910) : error C2061: syntax error :
                                                identifier 'LPSCROLLINFO'

   C:\MSVC20\MFC\INCLUDE\afxwin1.inl(20) : fatal error C1903: unable to
                     recover from previous error(s); stopping compilation

CAUSE

The identifier LPSCROLLINFO is not defined in the Afxwin.h file in version 3.2 of the Microsoft Foundation classes.

RESOLUTION

Run the provided Setupmfc.exe program, and add a path for the MFC 3.0 include directory to the INCLUDE environment variable in the development environment. More details follow.

The Visual C++ 2.2 Setup program installs a program called Setupmfc.exe in the Msvc20\Bin directory and installs an "MFC 3.0 Source Setup" icon for it in the Microsoft Visual C++ 2.0 program group. To see the icon, you need to have the Macintosh add-on installed before you install Visual C++ 2.2. Here are the necessary steps:

  1. Use Setupmfc.exe to reinstall MFC 3.0 source code. Make sure you use

        the Visual C++ 2.0 compact disc when the program asks for the MFC 3.0
        source directory. Using the Visual C++ 2.2 compact disc will not work.
    

  2. Open the Visual C++ development environment. On the Tools menu, click

        Directories. Under Platform, click Macintosh. Under Show Directories
        for, click Include files. Remove the existing header file directory for
        MFC 3.2. Click the Add button, and add a path for the MFC 3.0 include
        directory. For example:
    

        C:\Msvc20\Mfc30\Include
    

STATUS

This behavior is by design.


Additional reference words: 2.20 2.2 2.00
KBCategory: kbsetup kbtshoot kbprb
KBSubcategory: vcMacSetup


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: November 19, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.