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. VS2010 - debug version compiles, release version does not

VS2010 - debug version compiles, release version does not

Scheduled Pinned Locked Moved C / C++ / MFC
announcementcsharpc++visual-studiodebugging
8 Posts 6 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.
  • E Offline
    E Offline
    Ed SHaw
    wrote on last edited by
    #1

    ...and the errors are not in my code C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\include\afxwin2.inl(362): error C2039: 'NotifyWinEvent' : is not a member of '`global namespace'' C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\include\afxwin2.inl(362): error C2660: 'CWnd::NotifyWinEvent' : function does not take 4 arguments I do not call NotifyWinEvent directly. I have tried to #ifdef out most of the code but still get this error. Module compiles fine in VC++6.0 release/debug, VS2005 release/debug win32/x64, VS2010 debug win32/x64, but fails as above in VS2010 release win32/x64. I am using default settings to build everything. ES

    K 1 Reply Last reply
    0
    • E Ed SHaw

      ...and the errors are not in my code C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\include\afxwin2.inl(362): error C2039: 'NotifyWinEvent' : is not a member of '`global namespace'' C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\include\afxwin2.inl(362): error C2660: 'CWnd::NotifyWinEvent' : function does not take 4 arguments I do not call NotifyWinEvent directly. I have tried to #ifdef out most of the code but still get this error. Module compiles fine in VC++6.0 release/debug, VS2005 release/debug win32/x64, VS2010 debug win32/x64, but fails as above in VS2010 release win32/x64. I am using default settings to build everything. ES

      K Offline
      K Offline
      KarstenK
      wrote on last edited by
      #2

      Check the MFC and ATL settings in your Project.

      Press F1 for help or google it. Greetings from Germany

      W 1 Reply Last reply
      0
      • K KarstenK

        Check the MFC and ATL settings in your Project.

        Press F1 for help or google it. Greetings from Germany

        W Offline
        W Offline
        wishmaster80
        wrote on last edited by
        #3

        I have the same problem. What can be wrong with MFC and ATL settings?

        K E 2 Replies Last reply
        0
        • W wishmaster80

          I have the same problem. What can be wrong with MFC and ATL settings?

          K Offline
          K Offline
          KarstenK
          wrote on last edited by
          #4

          compare the settings in debug and release configs :doh:

          Press F1 for help or google it. Greetings from Germany

          1 Reply Last reply
          0
          • W wishmaster80

            I have the same problem. What can be wrong with MFC and ATL settings?

            E Offline
            E Offline
            Ed SHaw
            wrote on last edited by
            #5

            I had a series of #ifdef that were somehow impeding the compilation, There must be a conflict, but it does not explain differences between release and debug. Disabling these, as below, fixes the problem #if 0 // Allow use of features specific to Windows 95 and Windows NT 4 or later. #ifndef WINVER #define WINVER 0x0400 #endif // Allow use of features specific to Windows NT 4 or later. #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0500 #endif // Allow use of features specific to Windows 98 or later. #ifndef _WIN32_WINDOWS #define _WIN32_WINDOWS 0x0410 #endif ES // Allow use of features specific to IE 4.0 or later. #ifndef _WIN32_IE #define _WIN32_IE 0x0400 #endif #endif

            M 1 Reply Last reply
            0
            • E Ed SHaw

              I had a series of #ifdef that were somehow impeding the compilation, There must be a conflict, but it does not explain differences between release and debug. Disabling these, as below, fixes the problem #if 0 // Allow use of features specific to Windows 95 and Windows NT 4 or later. #ifndef WINVER #define WINVER 0x0400 #endif // Allow use of features specific to Windows NT 4 or later. #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0500 #endif // Allow use of features specific to Windows 98 or later. #ifndef _WIN32_WINDOWS #define _WIN32_WINDOWS 0x0410 #endif ES // Allow use of features specific to IE 4.0 or later. #ifndef _WIN32_IE #define _WIN32_IE 0x0400 #endif #endif

              M Offline
              M Offline
              mumg
              wrote on last edited by
              #6

              // Allow use of features specific to Windows 95 and Windows NT 4 or later. #ifndef WINVER #define WINVER 0x0500 <----------------- CHANGE HERE from 0x0400 to 0x0500 TO FIX PROBLEM #endif

              M G 2 Replies Last reply
              0
              • M mumg

                // Allow use of features specific to Windows 95 and Windows NT 4 or later. #ifndef WINVER #define WINVER 0x0500 <----------------- CHANGE HERE from 0x0400 to 0x0500 TO FIX PROBLEM #endif

                M Offline
                M Offline
                MatrixDud
                wrote on last edited by
                #7

                I had the same problem and changing the WINVER in stdafx worked for me.

                1 Reply Last reply
                0
                • M mumg

                  // Allow use of features specific to Windows 95 and Windows NT 4 or later. #ifndef WINVER #define WINVER 0x0500 <----------------- CHANGE HERE from 0x0400 to 0x0500 TO FIX PROBLEM #endif

                  G Offline
                  G Offline
                  GSc_Dev
                  wrote on last edited by
                  #8

                  Thank you!

                  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