Results 1 to 6 of 6

Thread: *Resolved* fatal error

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2001
    Posts
    396

    *Resolved* fatal error

    I'm getting this error.

    fatal error C1010: unexpected end of file while looking for precompiled header directive.

    I had added 2 files namely, cstate.h and cstate.cpp, into my SDI project.

    But I couldn't find any cstate.obj in the debug directory. Why doesn't VC compile them for me, even when I had added them?

    These 2 files are in my project directory.

    Help...
    Last edited by transcendental; Sep 2nd, 2002 at 10:41 AM.

  2. #2
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544
    Post your code...it makes it alot easier to help you
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2001
    Posts
    396
    "..........
    Error executing cl.exe."

    I think it is a linker error.

  4. #4
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544
    I need to see your source code to see what is causing the error
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2001
    Posts
    396
    code for the header, cstate.h
    Code:
    #include <afx.h>
    
    
    #ifndef _CSTATE_H_
    #define _CSTATE_H_
    
    
    class CState : CObject
    {
        public:  //For easy coding. Encapsulation is not the issue here,
                 //but for easy maintainence by using oop (cohesion and coupling)
        //Constructor and destructor
        CState();
        ~CState();
        
        //variable members
        int m_state;//must be initialise to 0
                  //0 means no state
                  //11 means 1a
                  //12 means 1b
                  //20 means 2
                  //31 means 3a and so on
        bool m_NeedFor3;//Indicate the need for state 3
        bool m_LineStatus;//For mousemove to draw the line
                          //if not in state 1a and 'line' toolbar is not on
                          //then false, mousemove no need to draw anything
        //Windows variables
        CRect m_framesize;// maintain the info for frame size
        HANDLE m_hImage;
        CDC m_memDC_1;
        CDC m_memDC_2;
        CDC m_memDC_3;
        CDC m_memDC_4;
        
        
        //Member functions
        void LoadtheBitmap();
        void InitialCal();
        void DoAllRendering();//For invisible rendering
        
        void Redraw1a();
        void Redraw1b();
        void Redraw2();
        void Redraw3a();
        void Redraw3b();
        void Redraw3c();
        void Redraw3d();
        
        void Resize1a();
        void Resize1b();
        void Resize2();
        void Resize3a();
        void Resize3b();
        void Resize3c();
        void Resize3d();
    };
    #endif
    code for the implementation file, cstate.cpp
    Frankly speaking, I haven't written anything yet. I was just included it and was going to write after seeing compiling successfully.

    In short, everything is here.

    Code:
    #include"cstate.h"
        //Constructor and destructor
    CState::CState(){
    		
    		m_state=0;
    		m_NeedFor3=FALSE;//Indicate the need for state 3
    		m_LineStatus=FALSE//For mousemove to draw the line
    }
    CState::~CState(){}
        
        
        
    //Member functions
    void CState::LoadtheBitmap(){}
    void CState::InitialCal(){}
    void CState::DoAllRendering(){}//For invisible rendering
        
        void CState::Redraw1a(){}
        void CState::Redraw1b(){}
        void CState::Redraw2(){}
        void CState::Redraw3a(){}
        void CState::Redraw3b(){}
        void CState::Redraw3c(){}
        void CState::Redraw3d(){}
        
        void CState::Resize1a(){}
        void CState::Resize1b(){}
        void CState::Resize2(){}
        void CState::Resize3a(){}
        void CState::Resize3b(){}
        void CState::Resize3c(){}
        void CState::Resize3d(){}

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2001
    Posts
    396
    Hi CyberCarsten, problem resolved, by adding a "#include<stdafx.h>" in front all other headers.

    Thanks for your effort.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width