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. can anybody help me out with this error:

can anybody help me out with this error:

Scheduled Pinned Locked Moved C / C++ / MFC
help
7 Posts 4 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.
  • A Offline
    A Offline
    ashokbngr
    wrote on last edited by
    #1

    assert(0); /// for this statement I am getting the following error error C2065: '__MODULE__' : undeclared identifier:confused: Thanks in advance Ashok

    C M 2 Replies Last reply
    0
    • A ashokbngr

      assert(0); /// for this statement I am getting the following error error C2065: '__MODULE__' : undeclared identifier:confused: Thanks in advance Ashok

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

      Looks like you're missing a #include.

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      A D 2 Replies Last reply
      0
      • C Christian Graus

        Looks like you're missing a #include.

        Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        A Offline
        A Offline
        ashokbngr
        wrote on last edited by
        #3

        I included the required header file... Thanks in advance, Ashok.

        1 Reply Last reply
        0
        • C Christian Graus

          Looks like you're missing a #include.

          Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

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

          Christian Graus wrote:

          Looks like you're missing a #include.

          Seems that would have resulted in: error C2065: 'assert' : undeclared identifier instead. With VS6, __MODULE__ is not even part of the assert() macro so I'm not sure what to even suggest.


          "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

          "Judge not by the eye but by the heart." - Native American Proverb

          1 Reply Last reply
          0
          • A ashokbngr

            assert(0); /// for this statement I am getting the following error error C2065: '__MODULE__' : undeclared identifier:confused: Thanks in advance Ashok

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

            Where did you get the __MODULE__ predefined macro from? If you right click on "assert" and choose "Go to Declaration" then what file do you end up in? It should be assert.h ( which you should be including with #include <assert.h> ). In the RTL code with VS2003, it only uses these macros: __FILE__ and __LINE__

            "If you can dodge a wrench, you can dodge a ball."

            A 1 Reply Last reply
            0
            • M Mark Salsbery

              Where did you get the __MODULE__ predefined macro from? If you right click on "assert" and choose "Go to Declaration" then what file do you end up in? It should be assert.h ( which you should be including with #include <assert.h> ). In the RTL code with VS2003, it only uses these macros: __FILE__ and __LINE__

              "If you can dodge a wrench, you can dodge a ball."

              A Offline
              A Offline
              ashokbngr
              wrote on last edited by
              #6

              ya exactly, assert(0); and printf("\nHere %s %d \n",__FILE__,__LINE__); // for both statements I am getting the same error. I included assert.h and tried but am unable to find the __MODULE__ predefined macro.. thanks in advance, Ashok

              M 1 Reply Last reply
              0
              • A ashokbngr

                ya exactly, assert(0); and printf("\nHere %s %d \n",__FILE__,__LINE__); // for both statements I am getting the same error. I included assert.h and tried but am unable to find the __MODULE__ predefined macro.. thanks in advance, Ashok

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

                Hmm I can't reproduce this at all. It works for me in console and GUI app builds no problems. In Google search __MODULE__ shows up related to linux and python. It's nowhere in the CRT or Platform SDK headers though. :confused:

                "If you can dodge a wrench, you can dodge a ball."

                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