Well on declaring an object as in file
and have included all the required project required files am getting Following Errors:Code:#include "stdafx.h" #include<iostream.h> #include "Pflow.h" int main(int argc, char* argv[]) { printf("Hello World!\n"); CPflowApp app; return 0; }
main.obj : error LNK2001: unresolved external symbol "public: __thiscall CPflowApp::CPflowApp(void)" (??0CPflowApp@@QAE@XZ)
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Debug/main.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
and the file Pflow.h the header file of my application class is given as:
Code:// Pflow.h : main header file for the PFLOW application // #if !defined(AFX_PFLOW_H__BB6F1EE1_33AA_4DF5_AF29_7A8DC123B309__INCLUDED_) #define AFX_PFLOW_H__BB6F1EE1_33AA_4DF5_AF29_7A8DC123B309__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #ifndef __AFXWIN_H__ #error include 'stdafx.h' before including this file for PCH #endif #include "resource1.h" // main symbols ///////////////////////////////////////////////////////////////////////////// // CPflowApp: // See Pflow.cpp for the implementation of this class // class CPflowApp : public CWinApp { public: CPflowApp(); int m_CurrentTool; // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CPflowApp) public: virtual BOOL InitInstance(); //}}AFX_VIRTUAL // Implementation //{{AFX_MSG(CPflowApp) afx_msg void OnAppAbout(); afx_msg void OnBus(); afx_msg void OnCapacitor(); afx_msg void OnGenerator(); afx_msg void OnLine(); afx_msg void OnLoad(); afx_msg void OnTransformer(); afx_msg void OnUpdateBus(CCmdUI* pCmdUI); afx_msg void OnUpdateTransformer(CCmdUI* pCmdUI); afx_msg void OnUpdateLoad(CCmdUI* pCmdUI); afx_msg void OnUpdateLine(CCmdUI* pCmdUI); afx_msg void OnUpdateGenerator(CCmdUI* pCmdUI); afx_msg void OnUpdateCapacitor(CCmdUI* pCmdUI); afx_msg void OnText(); afx_msg void OnUpdateText(CCmdUI* pCmdUI); afx_msg void OnDeleteBus(); afx_msg void OnUpdateDeleteBus(CCmdUI* pCmdUI); afx_msg void OnDeleteCapacitor(); afx_msg void OnUpdateDeleteCapacitor(CCmdUI* pCmdUI); afx_msg void OnDeleteGenerator(); afx_msg void OnUpdateDeleteGenerator(CCmdUI* pCmdUI); afx_msg void OnDeleteLine(); afx_msg void OnUpdateDeleteLine(CCmdUI* pCmdUI); afx_msg void OnDeleteLoad(); afx_msg void OnUpdateDeleteLoad(CCmdUI* pCmdUI); afx_msg void OnDeleteTransformer(); afx_msg void OnUpdateDeleteTransformer(CCmdUI* pCmdUI); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_PFLOW_H__BB6F1EE1_33AA_4DF5_AF29_7A8DC123B309__INCLUDED_)




Reply With Quote