這個錯誤訊息我看不懂 |
答題得分者是:GrandRURU
|
0083chu
一般會員 發表:6 回覆:7 積分:2 註冊:2009-08-03 發送簡訊給我 |
為什麼會出現這樣的訊息勒~~??
是哪裡出問題了嗎~~?? Error Reading Form Class NMUDP1 not found. Ignore the error and contiune? NOTE:Ignoring the error may cause components to be deleted or property values to be lost. Ignore Cancel Ignore All Error Field Form1->NMUDP1 does not have a corresponding component. Remove the declaration? Yes NO Cancel Help [C Error] UDP_R1.h(10): E2209 Unable to open include file 'NMUDP.hpp' [C Error] UDP_R1.h(16): E2303 Type name expected [C Error] UDP_R1.h(16): E2139 Declaration missing ; [C Error] UDP_R1.h(16): E2109 Not an allowed type [C Error] UDP_R1.cpp(19): E2451 Undefined symbol 'NMUDP1' [C Error] UDP_R1.cpp(27): E2451 Undefined symbol 'NMUDP1' [code cpp] .cpp //--------------------------------------------------------------------------- #include #pragma hdrstop #include "UDP_R1.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm1 *Form1; //--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TForm1::FormCreate(TObject *Sender) { NMUDP1->LocalPort=StrToInt(Edit1->Text); } //--------------------------------------------------------------------------- void __fastcall TForm1::NMUDP1DataReceived(TComponent *Sender, int NumberBytes, AnsiString FromIP, int Port) { char buffer[256]; int len; NMUDP1->ReadBuffer(buffer,256,len); buffer[len]=0; Edit2->Text=StrPas(buffer); Edit3->Text=FromIP; StatusBar1->SimpleText=IntToStr(len) " bytes received!"; } //--------------------------------------------------------------------------- [/code] [code cpp] .h //--------------------------------------------------------------------------- #ifndef UDP_R1H #define UDP_R1H //--------------------------------------------------------------------------- #include #include #include #include <Forms.hpp><br />#include #include //--------------------------------------------------------------------------- class TForm1 : public TForm { __published: // IDE-managed Components TNMUDP *NMUDP1; TLabel *Label1; TEdit *Edit1; TLabel *Label2; TEdit *Edit2; TLabel *Label3; TEdit *Edit3; TStatusBar *StatusBar1; void __fastcall FormCreate(TObject *Sender); void __fastcall NMUDP1DataReceived(TComponent *Sender, int NumberBytes, AnsiString FromIP, int Port); private: // User declarations public: // User declarations __fastcall TForm1(TComponent* Owner); }; //--------------------------------------------------------------------------- extern PACKAGE TForm1 *Form1; //--------------------------------------------------------------------------- #endif [/code] 寫Socket(Client/Server)也是一樣的狀況...=.= --------------------------------------------------------------------------------------------------------------------------------- 我參考這裡的的資料做的 http://bit.kuas.edu.tw/~csshieh/teach/np/
------
CHU |
GrandRURU
站務副站長 發表:240 回覆:1680 積分:1874 註冊:2005-06-21 發送簡訊給我 |
我有按照你所提供的程式碼做過一次,沒有你所說的問題咧
可能就如ide提供的錯誤一樣,NMUDP.hpp檔可能有問題 ===================引 用 0083chu 文 章=================== 為什麼會出現這樣的訊息勒~~?? 是哪裡出問題了嗎~~?? Error Reading Form Class NMUDP1 not found. Ignore the error and contiune? NOTE:Ignoring the error may cause components to be deleted or property values to be lost. Ignore Cancel Ignore All Error Field Form1->NMUDP1 does not have a corresponding component. Remove the declaration? Yes NO Cancel Help [C Error] UDP_R1.h(10): E2209 Unable to open include file 'NMUDP.hpp' [C Error] UDP_R1.h(16): E2303 Type name expected [C Error] UDP_R1.h(16): E2139 Declaration missing ; [C Error] UDP_R1.h(16): E2109 Not an allowed type [C Error] UDP_R1.cpp(19): E2451 Undefined symbol 'NMUDP1' [C Error] UDP_R1.cpp(27): E2451 Undefined symbol 'NMUDP1' 43......... |
0083chu
一般會員 發表:6 回覆:7 積分:2 註冊:2009-08-03 發送簡訊給我 |
|
taishyang
站務副站長 發表:377 回覆:5490 積分:4563 註冊:2002-10-08 發送簡訊給我 |
|
0083chu
一般會員 發表:6 回覆:7 積分:2 註冊:2009-08-03 發送簡訊給我 |
|
GrandRURU
站務副站長 發表:240 回覆:1680 積分:1874 註冊:2005-06-21 發送簡訊給我 |
|
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |