none
Upgrade Visual C++ 6.0 to Visual Studio 2015 RRS feed

  • Question

  • I have an MFC application that I built with Visual C++ 6.0 and I'd like to upgrade it to Visual Studio 2015.

    I have tried to open .dsw file using Visual Studio 2015.

    It asked me for conversion at the time of opening. I was proceed with conversion option.

    After successful conversion I tried to build same, but give me error with error no C1083. Cannot open include file ‘stdafx.h’.

    I checked in project files the header file was present there.

    Is there any additional setting other than include file path and library path ?

    Wednesday, January 4, 2017 10:41 AM

All replies

  • I have an MFC application that I built with Visual C++ 6.0 and I'd like to migrate it to Visual Studio 2015.

    Is there any tool for same ?

    • Merged by Baron Bi Friday, January 6, 2017 3:29 AM same case
    Wednesday, January 4, 2017 10:43 AM
  • I have an MFC application that I built with Visual C++ 6.0 and I'd like to upgrade it to Visual Studio 2015.

    I have tried to open .dsw file using Visual Studio 2015.

    It asked me for conversion at the time of opening. I was proceed with conversion option.

    After successful conversion I tried to build same, but give me error with error no C1083. Cannot open include file ‘stdafx.h’.

    I checked in project files the header file was present there.

    Is there any additional setting other than include file path and library path ?

    Make sure the converted project is set to use precompiled headers.

    Are all your source files in the same directory as the 'stdafx.h'?

    If you have a copy of VS2008, it might be a good idea to convert to that first (and make any necessary corrections), and then convert to VS2015.


    David Wilkinson | Visual C++ MVP

    Wednesday, January 4, 2017 11:27 AM
  • >I have an MFC application that I built with Visual C++ 6.0 and I'd
    >like to migrate it to Visual Studio 2015.
    >Is there any tool for same ?

    It's often not easy or prudent to try to convert by jumping over several
    releases. Each new release of VS has changes which can affect a program.
    These are usually described in documentation with the words "Breaking
    Changes" in the subject/title. Do a Web search for:

    MSDN Breaking Changes Visual Studio C++ MFC

    Read all of the applicable links.

    You should review the Breaking Changes for every release between 6.0
    and 2015. e.g. - 2003, 2005, 2008, 2010, 2012, 2013, 2015

    Be aware that the ISO C++ Standard has changed significantly from the
    time of VC++ 6.0 (circa 1998) and 2015/2016/2017. So compilers have
    changed to track the evolving Standards.

    Also search the MSDN forums for threads related to migrating or converting
    code from 6.0 to a later release. There are numerous.

    I'd be surprised if there's a conversion tool that jumps code from
    6.0 directly to 2015.

    - Wayne

    Wednesday, January 4, 2017 1:48 PM
  • Hi Dhaval Kalathia,

    thanks for posting here.

    >>After successful conversion I tried to build same, but give me error with error no C1083. Cannot open include file ‘stdafx.h’.

    stdafx.h is a file, generated by Microsoft Visual Studio IDE wizards and should be in the same folder with your project file. It describes both standard system and project specific include files that are used frequently but hardly ever change.

    For this case, you could try these steps below.

    1.Create stdafx.h and stdafx.cpp in your project

    2 Right click on project -> properties -> C/C++ -> Precompiled Headers, select precompiled header to create(/Yc)

    3.Rebuild the solution

    For more information, please refer to this document below.

    https://msdn.microsoft.com/en-us/library/szfdksca.aspx

    Hope this could be help of you.

    Best Regards,

    Sera Yu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    • Edited by Baron Bi Friday, January 6, 2017 3:26 AM
    Friday, January 6, 2017 3:23 AM
  • In addition, insert in include directory of your project settings the directory "."

    Maybe you have a file that needs stdafx.h but the file is not in the current project directory, so "." will find the stdafx.h.

    Tuesday, January 17, 2017 8:48 AM