Linking Problem (LNK2001)
-
Also unter
Settings -> Link -> Input : version.lib winspool.lib advapi32.lib
Settings -> Link -> General: version.lib winspool.lib advapi32.libIch habe entdeckt dass in einem Header HpWfmPA.h folgender Code steht:
// HpWfmPA.h: interface for the CHpWfmPA class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_HPWFMPA_H__1A00F36D_AF82_11D2_85B9_0060B0F8BD5A__INCLUDED_) #define AFX_HPWFMPA_H__1A00F36D_AF82_11D2_85B9_0060B0F8BD5A__INCLUDED_ #if _MSC_VER >= 1000 //#pragma once #endif // _MSC_VER >= 1000 #include "HpWfM.h" #include "gtypes.h" #include "comVerData.h" #include "verdataPM.h" class CHpException; // class CHpWfmPA : public CHpWfm { private: CHpWfmPA(const CHpWfmPA&) { ASSERT(FALSE); // don't want anyone calling this } protected: VER_RESPO_CH0_SPEC* m_cstSpec; VER_RESPO_CH0_SPEC* m_intSpec; int m_id; public: CHpWfmPA(int = 0,const TCHAR* = 0); virtual ~CHpWfmPA(); void StateMessage(LPCTSTR); void UserMessage(LPCTSTR); const VER_RESPO_CH0_SPEC* getCustomerSpec(int,CHpException** = 0); const VER_RESPO_CH0_SPEC* getInternalSpec(int,CHpException** = 0); }; // end of class CHpWfmPA #endif // !defined(AFX_HPWFMPA_H__1A00F36D_AF82_11D2_85B9_0060B0F8BD5A__INCLUDED_)Allerdings finde ich nirgendwo irgendwas von CHpWfmPA auf meinem Rechner...?
Danke für die Hilfe schon mal,
Phil
-
Dann suche mal in Deinem Projekt die Stelle, an der "HpWfmPA.h" eingebunden wird und kommentiere dies mal aus.
-
HpWfmPA.h wird in folgenden Dateien eingebunden:
HpWfmPA.cpp
PowAcc.h
PowAccDlg.hWenn ich das #include überall auskommentiere, bekomme ich 126 errors. Davon die meisten natürlich in der HpWfmPA.cpp.
?? ich bin echt total verwirrt, ... sorry.

-
hier die Build Ausgabe:
--------------------Configuration: PowAcc - Win32 Debug-------------------- Compiling... HpWfmPA.cpp Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.h(55) : error C2501: 'CHpWfmPA' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.h(55) : error C2143: syntax error : missing ';' before '*' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.h(55) : error C2501: 'm_wfm' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(32) : error C2653: 'CHpWfmPA' : is not a class or namespace name Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(36) : error C2550: 'CHpWfmPA' : constructor initializer lists are only allowed on constructor definitions Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(37) : warning C4508: 'CHpWfmPA' : function should return a value; 'void' return type assumed Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(49) : error C2653: 'CHpWfmPA' : is not a class or namespace name Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(53) : error C2065: 'm_cstSpec' : undeclared identifier Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(55) : error C2065: 'm_WfmError' : undeclared identifier Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(56) : error C2065: 'm_hWfm' : undeclared identifier Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(57) : error C2065: 'm_id' : undeclared identifier Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(59) : error C2100: illegal indirection Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(61) : error C2541: delete : cannot delete objects that are not pointers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(62) : error C2065: 'm_WfmErrorMsg' : undeclared identifier Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(62) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'class CString' (or there is no acceptable conversion) Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(64) : error C2065: 'm_intSpec' : undeclared identifier Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(70) : error C2100: illegal indirection Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(72) : error C2541: delete : cannot delete objects that are not pointers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(73) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'class CString' (or there is no acceptable conversion) Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(75) : warning C4508: 'CHpWfmPA' : function should return a value; 'void' return type assumed Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(87) : error C2734: 'VER_RESPO_CH0_SPEC' : const object must be initialized if not extern Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(87) : error C2239: unexpected token '*' following declaration of 'VER_RESPO_CH0_SPEC' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(87) : error C2059: syntax error : '*' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(87) : error C2653: 'CHpWfmPA' : is not a class or namespace name Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(94) : error C2143: syntax error : missing ';' before '}' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(98) : error C2143: syntax error : missing ';' before 'if' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(106) : error C2501: 'm_WfmErrorMsg' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(107) : error C2143: syntax error : missing ';' before 'delete' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(108) : error C2143: syntax error : missing ';' before '}' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(113) : error C2143: syntax error : missing ';' before 'break' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(114) : error C2143: syntax error : missing ';' before 'case' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(116) : error C2143: syntax error : missing ';' before 'break' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(117) : error C2143: syntax error : missing ';' before 'default' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(118) : error C2143: syntax error : missing ';' before '}' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(119) : error C2501: 'm_cstSpec' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(120) : error C2143: syntax error : missing ';' before '}' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(123) : error C2501: 'm_id' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(123) : error C2065: 'appId' : undeclared identifier Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(124) : error C2501: 'm_WfmError' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(128) : error C2100: illegal indirection Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(130) : error C2501: 'm_WfmErrorMsg' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(130) : error C2374: 'm_WfmErrorMsg' : redefinition; multiple initialization Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(131) : error C2143: syntax error : missing ';' before 'if' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(134) : error C2501: 'm_cstSpec' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(134) : error C2374: 'm_cstSpec' : redefinition; multiple initialization Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(135) : error C2143: syntax error : missing ';' before 'if' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(138) : error C2143: syntax error : missing ';' before '}' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(141) : error C2143: syntax error : missing ';' before '}' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(143) : error C2143: syntax error : missing ';' before '}' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(155) : error C2653: 'CHpWfmPA' : is not a class or namespace name Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(162) : error C2143: syntax error : missing ';' before '}' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(164) : error C2086: 'errorMsg' : redefinition Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(166) : error C2143: syntax error : missing ';' before 'if' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(174) : error C2501: 'm_WfmErrorMsg' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(174) : error C2374: 'm_WfmErrorMsg' : redefinition; multiple initialization Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(175) : error C2143: syntax error : missing ';' before 'delete' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(176) : error C2143: syntax error : missing ';' before '}' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(181) : error C2143: syntax error : missing ';' before 'break' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(182) : error C2143: syntax error : missing ';' before 'case' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(184) : error C2143: syntax error : missing ';' before 'break' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(185) : error C2143: syntax error : missing ';' before 'default' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(186) : error C2143: syntax error : missing ';' before '}' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(187) : error C2501: 'm_intSpec' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(188) : error C2143: syntax error : missing ';' before '}' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(191) : error C2501: 'm_id' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(191) : error C2374: 'm_id' : redefinition; multiple initialization Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(192) : error C2501: 'm_WfmError' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(192) : error C2374: 'm_WfmError' : redefinition; multiple initialization Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(196) : error C2100: illegal indirection Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(198) : error C2501: 'm_WfmErrorMsg' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(198) : error C2374: 'm_WfmErrorMsg' : redefinition; multiple initialization Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(199) : error C2143: syntax error : missing ';' before 'if' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(202) : error C2501: 'm_intSpec' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(202) : error C2374: 'm_intSpec' : redefinition; multiple initialization Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(203) : error C2143: syntax error : missing ';' before 'if' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(206) : error C2143: syntax error : missing ';' before '}' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(209) : error C2143: syntax error : missing ';' before '}' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(211) : error C2143: syntax error : missing ';' before '}' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(227) : error C2653: 'CHpWfmPA' : is not a class or namespace name Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(231) : error C2653: 'CHpWfm' : is not a class or namespace name Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(232) : error C2143: syntax error : missing ';' before '}' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(237) : error C2501: 'errMsg' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(237) : error C2239: unexpected token '.' following declaration of 'errMsg' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(237) : error C2059: syntax error : '.' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(238) : error C2501: 'AfxMessageBox' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(238) : error C2371: 'AfxMessageBox' : redefinition; different basic types Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(239) : error C2143: syntax error : missing ';' before '}' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(256) : error C2653: 'CHpWfmPA' : is not a class or namespace name Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(260) : error C2653: 'CHpWfm' : is not a class or namespace name Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(261) : error C2143: syntax error : missing ';' before '}' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(266) : error C2143: syntax error : missing ';' before 'switch' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(270) : error C2143: syntax error : missing ';' before 'case' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(272) : error C2143: syntax error : missing ';' before 'case' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(274) : error C2143: syntax error : missing ';' before 'case' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(276) : error C2143: syntax error : missing ';' before 'case' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(278) : error C2143: syntax error : missing ';' before 'case' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(280) : error C2143: syntax error : missing ';' before 'case' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(282) : error C2143: syntax error : missing ';' before 'default' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\HpWfmPA.cpp(284) : error C2143: syntax error : missing ';' before '}' PowAcc.cpp Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.h(55) : error C2501: 'CHpWfmPA' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.h(55) : error C2143: syntax error : missing ';' before '*' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.h(55) : error C2501: 'm_wfm' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\paResultBlock.h(20) : error C2501: 'VER_RESPO_CH0_BLOCK' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\paResultBlock.h(20) : error C2143: syntax error : missing ';' before '*' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\paResultBlock.h(20) : error C2501: 'm_blockPtr' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(67) : error C2614: 'CPowAccApp' : illegal member initialization: 'm_wfm' is not a base or member Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(128) : error C2065: 'm_wfm' : undeclared identifier Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(128) : error C2061: syntax error : identifier 'CHpWfmPA' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(134) : error C2541: delete : cannot delete objects that are not pointers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(274) : error C2227: left of '->CmdSetPosition' must point to class/struct/union Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(278) : error C2227: left of '->CmdAppExit' must point to class/struct/union Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(287) : error C2541: delete : cannot delete objects that are not pointers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(399) : error C2734: 'VER_RESPO_CH0_SPEC' : const object must be initialized if not extern Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(399) : error C2059: syntax error : '*' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(399) : error C2065: 'customerSpec' : undeclared identifier Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(400) : error C2734: 'VER_RESPO_CH0_SPEC' : const object must be initialized if not extern Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(400) : error C2086: 'VER_RESPO_CH0_SPEC' : redefinition Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(400) : error C2065: 'internalSpec' : undeclared identifier Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(411) : error C2227: left of '->getCustomerSpec' must point to class/struct/union Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(414) : error C2065: 'WFM_VERID_8163_RESPO_CH0' : undeclared identifier Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(414) : error C2065: 'WFM_VERID_8163_RESPO_CH1' : undeclared identifier Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(426) : error C2227: left of '->getInternalSpec' must point to class/struct/union Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(509) : error C2227: left of '->Results' must point to class/struct/union Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(528) : error C2227: left of '->relDifference_0' must point to class/struct/union Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(529) : error C2227: left of '->relDifference_0' must point to class/struct/union PowAccDlg.cpp Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.h(55) : error C2501: 'CHpWfmPA' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.h(55) : error C2143: syntax error : missing ';' before '*' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.h(55) : error C2501: 'm_wfm' : missing decl-specifiers Generating Code... Error executing cl.exe. PowAcc.exe - 126 error(s), 2 warning(s)
-
Mache die Auskommentierung in "HpWfmPA.cpp" mal rückgängig. Was passiert dann?
-
Folgendes:
--------------------Configuration: PowAcc - Win32 Debug-------------------- Compiling... HpWfmPA.cpp Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.h(55) : error C2501: 'CHpWfmPA' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.h(55) : error C2143: syntax error : missing ';' before '*' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.h(55) : error C2501: 'm_wfm' : missing decl-specifiers PowAcc.cpp Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.h(55) : error C2501: 'CHpWfmPA' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.h(55) : error C2143: syntax error : missing ';' before '*' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.h(55) : error C2501: 'm_wfm' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\paResultBlock.h(20) : error C2501: 'VER_RESPO_CH0_BLOCK' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\paResultBlock.h(20) : error C2143: syntax error : missing ';' before '*' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\paResultBlock.h(20) : error C2501: 'm_blockPtr' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(67) : error C2614: 'CPowAccApp' : illegal member initialization: 'm_wfm' is not a base or member Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(128) : error C2065: 'm_wfm' : undeclared identifier Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(128) : error C2061: syntax error : identifier 'CHpWfmPA' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(134) : error C2541: delete : cannot delete objects that are not pointers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(274) : error C2227: left of '->CmdSetPosition' must point to class/struct/union Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(278) : error C2227: left of '->CmdAppExit' must point to class/struct/union Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(287) : error C2541: delete : cannot delete objects that are not pointers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(399) : error C2734: 'VER_RESPO_CH0_SPEC' : const object must be initialized if not extern Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(399) : error C2059: syntax error : '*' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(399) : error C2065: 'customerSpec' : undeclared identifier Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(400) : error C2734: 'VER_RESPO_CH0_SPEC' : const object must be initialized if not extern Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(400) : error C2086: 'VER_RESPO_CH0_SPEC' : redefinition Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(400) : error C2065: 'internalSpec' : undeclared identifier Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(411) : error C2227: left of '->getCustomerSpec' must point to class/struct/union Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(414) : error C2065: 'WFM_VERID_8163_RESPO_CH0' : undeclared identifier Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(414) : error C2065: 'WFM_VERID_8163_RESPO_CH1' : undeclared identifier Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(426) : error C2227: left of '->getInternalSpec' must point to class/struct/union Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(509) : error C2227: left of '->Results' must point to class/struct/union Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(528) : error C2227: left of '->relDifference_0' must point to class/struct/union Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.cpp(529) : error C2227: left of '->relDifference_0' must point to class/struct/union PowAccDlg.cpp Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.h(55) : error C2501: 'CHpWfmPA' : missing decl-specifiers Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.h(55) : error C2143: syntax error : missing ';' before '*' Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\PowAcc.h(55) : error C2501: 'm_wfm' : missing decl-specifiers Generating Code... Error executing cl.exe. PowAcc.exe - 32 error(s), 0 warning(s)
-
Dein Projekt verwendet die Klasse CHpWfmPA, CHpWfm ist deren Basisklasse. Du solltest daher die Datei HpWfm.cpp in Dein Projekt einfügen, da sie hier noch nicht enthalten ist. Die auskommentierten Includes natürlich wieder zurücknehmen.
-
Die HpWfmPA.cpp ist allerdings eine Implementation von der CHpWfmPA Class... nur wie geht das, wenn die CHpWfmPA Class überhaupt nirgends vorhanden ist?
Hier mal Code Anfang von cer HpWfmPA.cpp:
#include "stdafx.h" #include "PowAcc.h" #include "HpWfmPA.h" #include "HpException.h" #ifdef _DEBUG #undef THIS_FILE static TCHAR THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif // static CString specType(_T("PA Spec : ")); // ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////////////////////////// // // CHpWfmPA::CHpWfmPA // // parameters : // // return : // //////////////////////////////////////////////////////////////////////////////// // CHpWfmPA::CHpWfmPA(int diagMask,const TCHAR* diagFile) : CHpWfm(diagMask,(TCHAR*)diagFile), m_cstSpec(0), m_intSpec(0) { } // end of CHpWfmPA::CHpWfmPA // //////////////////////////////////////////////////////////////////////////////// // // CHpWfmPA::~CHpWfmPA // // parameters : // // return : // //////////////////////////////////////////////////////////////////////////////// // CHpWfmPA::~CHpWfmPA() { TCHAR* errorMsg; if( m_cstSpec ) { m_WfmError = wfmDelVerSpec( m_hWfm, m_id, (void*)m_cstSpec, sizeof(*m_cstSpec), &errorMsg); delete m_cstSpec; m_WfmErrorMsg = specType + errorMsg; } if( m_intSpec ) { m_WfmError = wfmDelVerSpec( m_hWfm, m_id, (void*)m_intSpec, sizeof(*m_intSpec), &errorMsg); delete m_intSpec; m_WfmErrorMsg = specType + errorMsg; } } // end of CHpWfmPA::~CHpWfmPAHilft das irgendwie weiter? Noch irgendwelche Ideen oder absolut Aussichtslos?

-
Also Du meinst dass sie, obwohl sie links unter Source Files im Projekt aufgezeigt ist, nicht im Projekt enthalten ist?
Soll/muss ich dann beide (also .cpp und .h) manuell noch hinzufügen?(wenn das funktioniert flipp ich aus
)DankeDankeDanke,
Phil
-
Oh moment... vertan. Jetzt hab ich die HpWfmPA gemeint... moment ich schau mal gerade....
-
Ok Dateien (Header und cpp) gefunden und hinzugefügt.
Jetzt bekomme ich allerdings folgenden Fehler:--------------------Configuration: PowAcc - Win32 Debug-------------------- Compiling... hpwfm.cpp Z:\HP816_3_4\Verification\Kurt\Sensor\PowAcc\hpwfm.cpp(343) : fatal error C1010: unexpected end of file while looking for precompiled header directive Error executing cl.exe. PowAcc.exe - 1 error(s), 0 warning(s)Das ist doch nicht einfach nur eine Klammer zu viel oder zu wenig, oder?
Tausend Dank schon und noch mal

Phil
-
Füge mal am Anfang von hpwfm.cpp
#include "StdAfx.h"ein. Der Fehler besagt, dass die Datei keine vorkompilierten Header einbindet.
-
Ok hab ich getan. Und ich bekomme jetzt schon weniger Linking fehler... aber immer noch genug

--------------------Configuration: PowAcc - Win32 Debug-------------------- Compiling... hpwfm.cpp Linking... HpWfmPA.obj : error LNK2001: unresolved external symbol "public: __thiscall CHpObject::CHpObject(class CHpObject const &)" (??0CHpObject@@QAE@ABV0@@Z) hpwfm.obj : error LNK2001: unresolved external symbol "public: __thiscall CHpObject::CHpObject(class CHpObject const &)" (??0CHpObject@@QAE@ABV0@@Z) HpWfmPA.obj : error LNK2001: unresolved external symbol "public: __thiscall CHpException::CHpException(class CHpException const &)" (??0CHpException@@QAE@ABV0@@Z) hpwfm.obj : error LNK2001: unresolved external symbol "public: __thiscall CHpException::CHpException(class CHpException const &)" (??0CHpException@@QAE@ABV0@@Z) HpWfmPA.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CHpException::~CHpException(void)" (??1CHpException@@UAE@XZ) hpwfm.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CHpException::~CHpException(void)" (??1CHpException@@UAE@XZ) HpWfmPA.obj : error LNK2001: unresolved external symbol "public: __thiscall CHpException::CHpException(int,char const *)" (??0CHpException@@QAE@HPBD@Z) hpwfm.obj : error LNK2001: unresolved external symbol "public: __thiscall CHpException::CHpException(int,char const *)" (??0CHpException@@QAE@HPBD@Z) PowAcc.obj : error LNK2001: unresolved external symbol "public: void __thiscall CHpGraphicServer::CliSetChannel(int)" (?CliSetChannel@CHpGraphicServer@@QAEXH@Z) PowAcc.obj : error LNK2001: unresolved external symbol "public: void __thiscall CHpGraphicServer::CliShowChannel(int)" (?CliShowChannel@CHpGraphicServer@@QAEXH@Z) PowAcc.obj : error LNK2001: unresolved external symbol "public: void __thiscall CHpGraphicServer::CliPlotArray(double const *,double const *,unsigned int,int,double)" (?CliPlotArray@CHpGraphicServer@@QAEXPBN0IHN@Z) PowAcc.obj : error LNK2001: unresolved external symbol "public: void __thiscall CHpGraphicServer::CliSetParams(int)" (?CliSetParams@CHpGraphicServer@@QAEXH@Z) PowAcc.obj : error LNK2001: unresolved external symbol "public: void __thiscall CHpGraphicServer::SetLineStyle(int,int,int)" (?SetLineStyle@CHpGraphicServer@@QAEXHHH@Z) PowAcc.obj : error LNK2001: unresolved external symbol "public: void __thiscall CHpGraphicServer::SetDescr(char *,int,int)" (?SetDescr@CHpGraphicServer@@QAEXPADHH@Z) PowAcc.obj : error LNK2001: unresolved external symbol "public: void __thiscall CHpGraphicServer::SetAutoScaleY2(int,int,int)" (?SetAutoScaleY2@CHpGraphicServer@@QAEXHHH@Z) PowAcc.obj : error LNK2001: unresolved external symbol "public: void __thiscall CHpGraphicServer::SetLabelY2(char *,int,int)" (?SetLabelY2@CHpGraphicServer@@QAEXPADHH@Z) PowAcc.obj : error LNK2001: unresolved external symbol "public: void __thiscall CHpGraphicServer::SetLabelY(char *,int,int)" (?SetLabelY@CHpGraphicServer@@QAEXPADHH@Z) PowAcc.obj : error LNK2001: unresolved external symbol "public: void __thiscall CHpGraphicServer::SetLabelX(char *,int,int)" (?SetLabelX@CHpGraphicServer@@QAEXPADHH@Z) PowAcc.obj : error LNK2001: unresolved external symbol "public: void __thiscall CHpGraphicServer::SetAutoScaleY(int,int,int)" (?SetAutoScaleY@CHpGraphicServer@@QAEXHHH@Z) PowAcc.obj : error LNK2001: unresolved external symbol "public: void __thiscall CHpGraphicServer::SetAutoScaleX(int,int,int)" (?SetAutoScaleX@CHpGraphicServer@@QAEXHHH@Z) PowAcc.obj : error LNK2001: unresolved external symbol "public: void __thiscall CHpGraphicServer::SetMaxY(double,int,int)" (?SetMaxY@CHpGraphicServer@@QAEXNHH@Z) PowAcc.obj : error LNK2001: unresolved external symbol "public: void __thiscall CHpGraphicServer::SetMinY(double,int,int)" (?SetMinY@CHpGraphicServer@@QAEXNHH@Z) PowAcc.obj : error LNK2001: unresolved external symbol "public: void __thiscall CHpGraphicServer::SetMaxX(double,int,int)" (?SetMaxX@CHpGraphicServer@@QAEXNHH@Z) PowAcc.obj : error LNK2001: unresolved external symbol "public: void __thiscall CHpGraphicServer::SetMinX(double,int,int)" (?SetMinX@CHpGraphicServer@@QAEXNHH@Z) PowAcc.obj : error LNK2001: unresolved external symbol "public: void __thiscall CHpGraphicServer::SetSpecLow(double,int,int)" (?SetSpecLow@CHpGraphicServer@@QAEXNHH@Z) PowAcc.obj : error LNK2001: unresolved external symbol "public: void __thiscall CHpGraphicServer::SetSpecHigh(double,int,int)" (?SetSpecHigh@CHpGraphicServer@@QAEXNHH@Z) PowAcc.obj : error LNK2001: unresolved external symbol "public: void __thiscall CHpGraphicServer::SetSpecMaxX(double,int,int)" (?SetSpecMaxX@CHpGraphicServer@@QAEXNHH@Z) PowAcc.obj : error LNK2001: unresolved external symbol "public: void __thiscall CHpGraphicServer::SetSpecMinX(double,int,int)" (?SetSpecMinX@CHpGraphicServer@@QAEXNHH@Z) PowAcc.obj : error LNK2001: unresolved external symbol "public: void __thiscall CHpGraphicServer::SetMaxDim(int,int,int)" (?SetMaxDim@CHpGraphicServer@@QAEXHHH@Z) PowAcc.obj : error LNK2001: unresolved external symbol "public: void __thiscall CHpGraphicServer::CliNewUdamDoc(void)" (?CliNewUdamDoc@CHpGraphicServer@@QAEXXZ) PowAcc.obj : error LNK2001: unresolved external symbol "public: __thiscall CHpGraphicServer::CHpGraphicServer(void)" (??0CHpGraphicServer@@QAE@XZ) hpwfm.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CHpDataInterface::~CHpDataInterface(void)" (??1CHpDataInterface@@UAE@XZ) hpwfm.obj : error LNK2001: unresolved external symbol "public: __thiscall CHpDataInterface::CHpDataInterface(void)" (??0CHpDataInterface@@QAE@XZ) Debug/PowAcc.exe : fatal error LNK1120: 29 unresolved externals Error executing link.exe. PowAcc.exe - 34 error(s), 0 warning(s)Das merkwürdige ist, dass immer noch HpWfmPA Fehler da zu sein scheinen??
-
Hahaaa..

Wow dank Deiner Hilfe konnte ich jetzt alles auf einen Error reduzieren. Habe noch eine ganze Menge cpps und header eingefügt... quasi immer das gleiche Spiel.
Allein dafür schon mal 10000Dank und größten Respekt für das Verständnis!Bleit ein Error:
Linking... The system cannot find the path specified. 0 file(s) copied. Error executing c:\windows\system32\cmd.exe. PowAcc.exe - 1 error(s), 0 warning(s)Leider sagt mir auch dieser Error überhaupt nichts?
-
*wwweeeiiirrd*
Noch mal ich... sehr merkwürdig aber gut: Der Fehler ist beim zweiten Versuch einfach nicht mehr aufgetreten. Nicht das ich iirgendetwas geändert hätte!?!
Aber @sri:
Dir gebührt sooo viel Dank!! Ohne Dich wäre ich wohl nicht soweit gekommen und ich möchte Dir sehr für Deine Hilfe Danken!!!!

Beste Grüße,
PhilP.s.: Dürfte ich Dich noch fragen wie Du (nur aus meinen Postings) erkannt hast dass die besagte(n) Dateien nicht im Projekt eingebunden waren?
-
Gern geschehen.

phil_z schrieb:
P.s.: Dürfte ich Dich noch fragen wie Du (nur aus meinen Postings) erkannt hast dass die besagte(n) Dateien nicht im Projekt eingebunden waren?
Glück und etwas Erfahrung. Und beides hast Du beim Beseitigen der letzten Linkerfehler dann ja auch selbst gehabt.

-
Haha Touche!

Also Tausend Dank!!!

(auch wenn ich jetzt beim ausführen der exe weitere wirklich wirklich merkwürdige(n) Fehler habe (siehe http://www.c-plusplus.net/forum/viewtopic-var-p-is-1497619.html#1497619)
Das war auch überhaupt der Grund warum ich das Projekt Debuggen wollte, um zu sehen wie der dort beschriebene Fehler (Assertion Failed) auftritt.
Naja also beste Grüße

Phil