|
-
Sep 2nd, 2002, 09:24 AM
#1
Thread Starter
Hyperactive Member
*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.
-
Sep 2nd, 2002, 09:39 AM
#2
Frenzied Member
Post your code...it makes it alot easier to help you
-
Sep 2nd, 2002, 10:11 AM
#3
Thread Starter
Hyperactive Member
"..........
Error executing cl.exe."
I think it is a linker error.
-
Sep 2nd, 2002, 10:13 AM
#4
Frenzied Member
I need to see your source code to see what is causing the error
-
Sep 2nd, 2002, 10:23 AM
#5
Thread Starter
Hyperactive Member
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(){}
-
Sep 2nd, 2002, 10:40 AM
#6
Thread Starter
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|