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. Compiler doesn't know class.... sometimes

Compiler doesn't know class.... sometimes

Scheduled Pinned Locked Moved C / C++ / MFC
c++debugginghelp
5 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.
  • L Offline
    L Offline
    Lilith C
    wrote on last edited by
    #1

    In preparation for retro-incorporating the MiniExcel class into a number of my projects I've set up a practice project in order to get familiar with the class. I'm in VC++ 6.0 and the project is an MFC exe. I've put the mexcel.cpp and mexcel.h files in the base project directory. I've added both files to the project. I've #included mexcel.h in stdafx.h and also, for good measure, in the view doc file. The class shows up in the Classes tab, though it doesn't show up in ClassWizard after a rebuild of the CLW file. I've declare an object of class CMiniExcel as a local variable inside a button message handler. When I go to compile I get four errors. The first three indicate that the class is unknown. The fourth is: fatal error C1010: unexpected end of file while looking for precompiled header directive Additionally I've noticed that instead of being placed in the DEBUG directory the system has created a directory with the projects base name followed by ___Win32_Debug Am I using a class that needs to be modified to work under MFC or am I overlooking something else. Thanks, Lilith

    M 1 Reply Last reply
    0
    • L Lilith C

      In preparation for retro-incorporating the MiniExcel class into a number of my projects I've set up a practice project in order to get familiar with the class. I'm in VC++ 6.0 and the project is an MFC exe. I've put the mexcel.cpp and mexcel.h files in the base project directory. I've added both files to the project. I've #included mexcel.h in stdafx.h and also, for good measure, in the view doc file. The class shows up in the Classes tab, though it doesn't show up in ClassWizard after a rebuild of the CLW file. I've declare an object of class CMiniExcel as a local variable inside a button message handler. When I go to compile I get four errors. The first three indicate that the class is unknown. The fourth is: fatal error C1010: unexpected end of file while looking for precompiled header directive Additionally I've noticed that instead of being placed in the DEBUG directory the system has created a directory with the projects base name followed by ___Win32_Debug Am I using a class that needs to be modified to work under MFC or am I overlooking something else. Thanks, Lilith

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      See the FAQ 2.5 I added some source files I got from someone else into my project and the compiler gives the error "C1010: unexpected end of file while looking for precompiled header directive." Why?[^] Fixing the PCH settings may take care of the other errors --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ Come quietly or there will be... trouble.

      L 2 Replies Last reply
      0
      • M Michael Dunn

        See the FAQ 2.5 I added some source files I got from someone else into my project and the compiler gives the error "C1010: unexpected end of file while looking for precompiled header directive." Why?[^] Fixing the PCH settings may take care of the other errors --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ Come quietly or there will be... trouble.

        L Offline
        L Offline
        Lilith C
        wrote on last edited by
        #3

        Sorry, still no change. But thanks nonetheless. Lilith

        1 Reply Last reply
        0
        • M Michael Dunn

          See the FAQ 2.5 I added some source files I got from someone else into my project and the compiler gives the error "C1010: unexpected end of file while looking for precompiled header directive." Why?[^] Fixing the PCH settings may take care of the other errors --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ Come quietly or there will be... trouble.

          L Offline
          L Offline
          Lilith C
          wrote on last edited by
          #4

          blockquote class="FQ">

          Michael Dunn wrote:

          Fixing the PCH settings may take care of the other errors A revision to my previous reply. I've gotten past the error but have gotten four warnings of the same type. It compiles and links. But I'd be interested in suppressing the warnings if possible. The error/warning is C4786 'identifier' : identifier was truncated to 'number' characters in the debug information The identifier string exceeded the maximum allowable length and was truncated. It doesn't appear to be an identifer as much as it's an expansion of a vector template. Since namespace is specified as std that gets included in the expansion to the point that the entire line is over 300 characters. Lilith

          M 1 Reply Last reply
          0
          • L Lilith C

            blockquote class="FQ">

            Michael Dunn wrote:

            Fixing the PCH settings may take care of the other errors A revision to my previous reply. I've gotten past the error but have gotten four warnings of the same type. It compiles and links. But I'd be interested in suppressing the warnings if possible. The error/warning is C4786 'identifier' : identifier was truncated to 'number' characters in the debug information The identifier string exceeded the maximum allowable length and was truncated. It doesn't appear to be an identifer as much as it's an expansion of a vector template. Since namespace is specified as std that gets included in the expansion to the point that the entire line is over 300 characters. Lilith

            M Offline
            M Offline
            Michael Dunn
            wrote on last edited by
            #5

            Lilith.C wrote:

            C4786 'identifier' : identifier was truncated to 'number' characters in the debug information

            That's harmless, you can turn it off. --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ Ford, what's this fish doing in my ear?

            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