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