Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Problems compiling project in Visual C++ studio

Problems compiling project in Visual C++ studio

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
10 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tokorie
    wrote on last edited by
    #1

    I recently downloaded Visual C++ Studio and when I try to compile my project, I get error messages such as these below. I made sure to follow the instructions on setting the VC++ Directories option but I still keep getting errors such as this one c:\Pam 2\Headers\afxwin.h(19) : fatal error C1083: Cannot open include file: 'AFX.h': No such file or directory and the problem is that most of these include files happen to be in the Windows Platform SDK / Include/MFC folder. How do I get my the compiler to look in there for these files please. Tokorie

    M 1 Reply Last reply
    0
    • T Tokorie

      I recently downloaded Visual C++ Studio and when I try to compile my project, I get error messages such as these below. I made sure to follow the instructions on setting the VC++ Directories option but I still keep getting errors such as this one c:\Pam 2\Headers\afxwin.h(19) : fatal error C1083: Cannot open include file: 'AFX.h': No such file or directory and the problem is that most of these include files happen to be in the Windows Platform SDK / Include/MFC folder. How do I get my the compiler to look in there for these files please. Tokorie

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      Tokorie wrote:

      recently downloaded Visual C++ Studio

      Downloaded the express edition? If so, it doesn't come with MFC :(

      T 1 Reply Last reply
      0
      • M Mark Salsbery

        Tokorie wrote:

        recently downloaded Visual C++ Studio

        Downloaded the express edition? If so, it doesn't come with MFC :(

        T Offline
        T Offline
        Tokorie
        wrote on last edited by
        #3

        I did download the express edition and then I downloaded SDK and followed the instructions on this page to get the two integrated http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx[^] but the problem is that it is still not detecting the files in the SDK and I would like to get the two working so I can compile my files without all these errors

        M 1 Reply Last reply
        0
        • T Tokorie

          I did download the express edition and then I downloaded SDK and followed the instructions on this page to get the two integrated http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx[^] but the problem is that it is still not detecting the files in the SDK and I would like to get the two working so I can compile my files without all these errors

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          Hmmm the last time I checked, you could only build native apps with the express edition.

          T 1 Reply Last reply
          0
          • M Mark Salsbery

            Hmmm the last time I checked, you could only build native apps with the express edition.

            T Offline
            T Offline
            Tokorie
            wrote on last edited by
            #5

            It is able to do more now but needs to have the settings done correctly and that is the problem I keep having.

            M 1 Reply Last reply
            0
            • T Tokorie

              It is able to do more now but needs to have the settings done correctly and that is the problem I keep having.

              M Offline
              M Offline
              Mark Salsbery
              wrote on last edited by
              #6

              Tokorie wrote:

              It is able to do more now

              ok... so what about adding C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\mfc to the include directories?

              T 1 Reply Last reply
              0
              • M Mark Salsbery

                Tokorie wrote:

                It is able to do more now

                ok... so what about adding C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\mfc to the include directories?

                T Offline
                T Offline
                Tokorie
                wrote on last edited by
                #7

                Can you help with this error ?? C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\mfc\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include

                M 1 Reply Last reply
                0
                • T Tokorie

                  Can you help with this error ?? C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\mfc\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include

                  M Offline
                  M Offline
                  Mark Salsbery
                  wrote on last edited by
                  #8

                  Are you including windows.h explicitly somewhere? Also make sure you have something like this before any MFC header file includes... #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0400 #endif Even if you get past this, the MFC included with the platform SDK is from VC 6. If you get it to compile and run on 2005 express you will be the first I believe. Even then, you'd be using MFC version 4.x :(

                  T 1 Reply Last reply
                  0
                  • M Mark Salsbery

                    Are you including windows.h explicitly somewhere? Also make sure you have something like this before any MFC header file includes... #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0400 #endif Even if you get past this, the MFC included with the platform SDK is from VC 6. If you get it to compile and run on 2005 express you will be the first I believe. Even then, you'd be using MFC version 4.x :(

                    T Offline
                    T Offline
                    Tokorie
                    wrote on last edited by
                    #9

                    that didn't help.... the same problem persists and this what it points to when I compile and it gives me that error #ifdef _WINDOWS_ #error WINDOWS.H already included. MFC apps must not #include #endif

                    C 1 Reply Last reply
                    0
                    • T Tokorie

                      that didn't help.... the same problem persists and this what it points to when I compile and it gives me that error #ifdef _WINDOWS_ #error WINDOWS.H already included. MFC apps must not #include #endif

                      C Offline
                      C Offline
                      Christian Graus
                      wrote on last edited by
                      #10

                      According to http://msdn.microsoft.com/vstudio/express/support/faq/[^], MFC and ATL are not included.  On what basis do you believe this has changed ? MFC does not come with the platform SDK, unless it's the 64 bit version ( so I've been told ).

                      Christian Graus - C++ MVP

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups