Menu

fatal error C1010: unexpected end of file whi

Unni
2005-05-05
2013-05-20
  • Unni

    Unni - 2005-05-05

    Hi,

    I am using VC++ 1.52, based on the tutorial doc, I copied all the CPP and H files into my project. I added the cpp files to my project and when I compiled I got C1010 error.

    Please help.
    Thanks.

     
    • B Sizer

      B Sizer - 2005-05-05

      Turn off precompiled headers for that project.

       
    • Unni

      Unni - 2005-05-06

      Before doing any changes to the project, I was getting only 4 of the1010 error. I went to project and removed the stdafx from the precompiled headers and now I get arounf 399 errors; some of the errors are

      include\tinystr.h(52) : error C2501: 'explicit' : missing decl-specifiers
      include\tinystr.h(52) : error C2146: syntax error : missing ';' before identifier 'TiXmlString'
      include\tinystr.h(63) : error C2501: 'explicit' : missing decl-specifiers
      include\tinystr.h(63) : error C2146: syntax error : missing ';' before identifier 'TiXmlString'
      /include\tinystr.h(111) : error C2501: 'bool' : missing decl-specifiers
      include\tinystr.h(111) : error C2143: syntax error : missing ';' before 'operator <op>'
      include\tinystr.h(111) : error C2240: unexpected 'const int ' following formal list (only modifiers are allowed)
      include\tinystr.h(112) : error C2501: 'bool' : missing decl-specifiers
      include\tinystr.h(112) : error C2143: syntax error : missing ';' before 'operator <op>'
      include\tinystr.h(112) : error C2240: unexpected 'const int ' following formal list (only modifiers are allowed)
      include\tinystr.h(113) : error C2501: 'bool' : missing decl-specifiers
      include\tinystr.h(113) : error C2143: syntax error : missing ';' before 'operator <op>'
      include\tinystr.h(113) : error C2240: unexpected 'const int ' following formal list (only modifiers are allowed)
      include\tinystr.h(114) : error C2501: 'bool' : missing decl-specifiers
      include\tinystr.h(114) : error C2143: syntax error : missing ';' before 'operator <op>'
      include\tinystr.h(114) : error C2240: unexpected 'const int ' following formal list (only modifiers are allowed)
      include\tinystr.h(117) : error C2501: 'bool' : missing decl-specifiers
      include\tinystr.h(117) : error C2146: syntax error : missing ';' before identifier 'empty'
      include\tinystr.h(118) : error C2240: unexpected 'const int ' following formal list (only modifiers are allowed)
      c:\windows\temp\004780if(1) : error C2061: syntax error : identifier 'TiXmlOutStream'

      Any help?

       
      • Ellers

        Ellers - 2005-05-06

        The includes that were contained in the stdafx.h - did you include them into your project?

         
    • Unni

      Unni - 2005-05-06

      Well, I removed the program that was using it (thats what I thought). When I did a scan on stdafx almost 45 programs in the project showed up. So it is much bigger than what I thought. This is one of the legacy project.

      Is there a way around to solve this problem? Just curious, what is in the stdafx that is causing the issue?

       
      • Ellers

        Ellers - 2005-05-06

        If you have 45 separate projects, chances are they use their own stdafx.h. Or am I misunderstanding you?

        stdafx.h is MSVC's way of doing precompiled headers.

        In other words, if you normally #include "abc.h" and 100 other files, you can put them in stdafx.h and voila, they will be precompiled so you don't have to compile them every time.

        So, you see why you need to take the CONTENTS of stdafx.h and put it into your project somewhere else.

        Basically, create some project.h and put the contents of stdafx.h into it, then ensure everything that was including stdafx.h is now including project.h.

        HTH
        Ellers

         
    • Unni

      Unni - 2005-05-06

      One thing I found when I removed the stdafx.h, my debugging feature went over the limit. So I do not have the ability to debug the complete code.

      Sorry to bother you with this. Is there any otherway, I would able to overcome this by setting something in the tinyxml.cpp?

       
      • Ellers

        Ellers - 2005-05-07

        Hmm. Sorry to be blunt but I think you need to read the MSVC++ documentation. Why are you using version v1.52? Is that suitable for a specific architecture or product or something?

         
    • Unni

      Unni - 2005-05-16

      Sorry it took too long. Well, after lot of research I found a way to use TinyXML along with VC1.52. I needed to do something which is not currently supported in VC1.52. (Converting 1.52 to 6 is too much of a work) so I created a dos vc6.0 app. Which is spawn from 1.52 and returns control back to legacy. It is working. Now here is my other issue.

      I was now able to compile the program with out the C1010 issue, but I am getting

      error C2065: 'TiXmlDocument' : undeclared identifier

      I added tinyxml.h, tinystr.h and all the four .cpp as specified in the documentation.

      Sorry to bug you. Please let me know what I am doing wrong?

      Thanks.

       
    • Unni

      Unni - 2005-05-16

      Please ignore my previous message. It was my mistake, I didn't include tinyxml.h

      My mistake sorry.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.