線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:4136
推到 Plurk!
推到 Facebook!

這個錯誤訊息我看不懂

答題得分者是:GrandRURU
0083chu
一般會員


發表:6
回覆:7
積分:2
註冊:2009-08-03

發送簡訊給我
#1 引用回覆 回覆 發表時間:2009-08-29 00:11:41 IP:121.254.xxx.xxx 訂閱
為什麼會出現這樣的訊息勒~~??
是哪裡出問題了嗎~~??

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

發送簡訊給我
#2 引用回覆 回覆 發表時間:2009-08-29 09:39:07 IP:203.75.xxx.xxx 未訂閱
我有按照你所提供的程式碼做過一次,沒有你所說的問題咧

可能就如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

發送簡訊給我
#3 引用回覆 回覆 發表時間:2009-08-29 10:33:50 IP:121.254.xxx.xxx 訂閱

===================引 用 GrandRURU 文 章===================
我有按照你所提供的程式碼做過一次,沒有你所說的問題咧

可能就如ide提供的錯誤一樣,NMUDP.hpp檔可能有問題


要撤掉重灌歐....=.=
------
CHU
taishyang
站務副站長


發表:377
回覆:5490
積分:4563
註冊:2002-10-08

發送簡訊給我
#4 引用回覆 回覆 發表時間:2009-08-29 23:10:34 IP:218.169.xxx.xxx 訂閱
你有 NMUDP1這個元件嗎?
0083chu
一般會員


發表:6
回覆:7
積分:2
註冊:2009-08-03

發送簡訊給我
#5 引用回覆 回覆 發表時間:2009-08-31 10:33:56 IP:121.254.xxx.xxx 訂閱

===================引 用 taishyang 文 章===================
你有 NMUDP1這個元件嗎?

那要怎麼知道有沒有這個元件呢?
BCB2006的
------
CHU
GrandRURU
站務副站長


發表:240
回覆:1680
積分:1874
註冊:2005-06-21

發送簡訊給我
#6 引用回覆 回覆 發表時間:2009-08-31 10:49:07 IP:203.75.xxx.xxx 未訂閱
沒有就是看不到囉
有些元件是要在安裝光碟中自行安裝的(留校查看的元件,未來的版本可能會消失的,像SQLClientDataSet就是一個例子)

要就直接學indy吧,不要再學FastNet了

(另外,找了一下Google,發現BDS2006好像也沒有FastNet元件,但我沒有2006就是了)

===================引 用 0083chu 文 章===================

===================引 用 taishyang 文 章===================
你有 NMUDP1這個元件嗎?

那要怎麼知道有沒有這個元件呢?
BCB2006的
系統時間:2024-04-24 23:00:55
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!