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. Help on this error!!

Help on this error!!

Scheduled Pinned Locked Moved C / C++ / MFC
helpcsharpc++visual-studiotutorial
6 Posts 2 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.
  • S Offline
    S Offline
    smartymanav
    wrote on last edited by
    #1

    Hii all i am getting a single error when i complile my project the error is:: c:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include how to solve this error?????? thanks a lot

    D 1 Reply Last reply
    0
    • S smartymanav

      Hii all i am getting a single error when i complile my project the error is:: c:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include how to solve this error?????? thanks a lot

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      So are you including windows.h like the error indicates?


      "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

      S 1 Reply Last reply
      0
      • D David Crow

        So are you including windows.h like the error indicates?


        "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

        S Offline
        S Offline
        smartymanav
        wrote on last edited by
        #3

        no i am not including it(windows.h)!!! sud i send u my whole project source code...i am buililding a database project using ado i have included only comdef.h as an external header file....rest the mfc wizards add on its own which it does in every project thats y i am not able to sort this error out?? please help

        D 1 Reply Last reply
        0
        • S smartymanav

          no i am not including it(windows.h)!!! sud i send u my whole project source code...i am buililding a database project using ado i have included only comdef.h as an external header file....rest the mfc wizards add on its own which it does in every project thats y i am not able to sort this error out?? please help

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          smartymanav wrote: sud i send u my whole project source code Not necessary. Right above the "fatal error C1189..." line in the Build window should be the name of a .cpp file. Look in that file for any irregularities.


          "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

          S 1 Reply Last reply
          0
          • D David Crow

            smartymanav wrote: sud i send u my whole project source code Not necessary. Right above the "fatal error C1189..." line in the Build window should be the name of a .cpp file. Look in that file for any irregularities.


            "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

            S Offline
            S Offline
            smartymanav
            wrote on last edited by
            #5

            the name of the file is stdafx.h!!! --------------------Configuration: Ado1 - Win32 Debug-------------------- Compiling resources... Compiling... StdAfx.cpp c:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include Error executing cl.exe. Ado1.exe - 1 error(s), 0 warning(s) wat to do now... i have only added one line to this file is:: #include please help and thanks

            D 1 Reply Last reply
            0
            • S smartymanav

              the name of the file is stdafx.h!!! --------------------Configuration: Ado1 - Win32 Debug-------------------- Compiling resources... Compiling... StdAfx.cpp c:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include Error executing cl.exe. Ado1.exe - 1 error(s), 0 warning(s) wat to do now... i have only added one line to this file is:: #include please help and thanks

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              Ok, so you have a #include hierarchy like this:

              stdafx.cpp
              |
              \---stdafx.h
              |
              ----afxv_w32.h
              |
              \---comdef.h

              Is that right?


              "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

              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