 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Curt Guest
|
Posted: Fri Sep 09, 2005 2:25 am Post subject: TIdTCPClient Base Class |
|
|
I am trying to derive a very simple class from TIdTCPClient but I get the
error
Unresolved external '__fastcall IdTcpclient::TIdTCPClient::SetPortA(const
int)' referenced from c:...unit2.obj.
Does anyone have any idea why I get this error ?
Here are the steps I take:
1) New Application
2) New Unit
3) The following code in the new unit (.H and .C)
.H
//--------------------------------------------------------------------------
-
#ifndef Unit2H
#define Unit2H
//--------------------------------------------------------------------------
-
#include <winsock2> // just to cover for multiple fd_set error
#include <IdBaseComponent.hpp>
#include <IdComponent.hpp>
#include <IdTCPClient.hpp>
#include <IdTCPConnection.hpp>
class TTest : public Idtcpclient::TIdTCPClient
{
public:
__fastcall virtual TTest(Classes::TComponent* AOwner);
};
#endif
.C
//--------------------------------------------------------------------------
-
#pragma hdrstop
#include "Unit2.h"
//--------------------------------------------------------------------------
-
#pragma package(smart_init)
__fastcall TTest::TTest(Classes::TComponent* AOwner) : TIdTCPClient(AOwner)
{
};
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Fri Sep 09, 2005 3:40 am Post subject: Re: TIdTCPClient Base Class |
|
|
"Curt" <noemailaddress> wrote
| Quote: | Unresolved external '__fastcall IdTcpclient::TIdTCPClient::SetPortA(const
int)' referenced from c:...unit2.obj.
|
Known problem. It is a Win32 API "bug", not an Indy bug. winspool.h
declares a #define statement that maps SetPort() to SetPortA() or SetPortW()
depending on whether UNICODE is declared. #define statements are global,
effecting the entire application.
If you go to http://search.borland.com and http://www.deja.com and search
for "SetPortA", you will see that this issue has been discussed many times
before.
Gambit
|
|
| Back to top |
|
 |
Curt Guest
|
Posted: Fri Sep 09, 2005 3:54 am Post subject: Re: TIdTCPClient Base Class |
|
|
Thank you.
"Remy Lebeau (TeamB)" <no.spam (AT) no (DOT) spam.com> wrote
| Quote: |
"Curt" <noemailaddress> wrote in message
news:4320f1c9$1 (AT) newsgroups (DOT) borland.com...
Unresolved external '__fastcall
IdTcpclient::TIdTCPClient::SetPortA(const
int)' referenced from c:...unit2.obj.
Known problem. It is a Win32 API "bug", not an Indy bug. winspool.h
declares a #define statement that maps SetPort() to SetPortA() or
SetPortW()
depending on whether UNICODE is declared. #define statements are global,
effecting the entire application.
If you go to http://search.borland.com and http://www.deja.com and search
for "SetPortA", you will see that this issue has been discussed many times
before.
Gambit
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|