Thread View: borland.public.cppbuilder.internet.socket
3 messages
3 total messages
Started by Curt
Fri, 09 Sep 2005 02:25
TIdTCPClient Base Class
Author: Curt
Date: Fri, 09 Sep 2005 02:25
Date: Fri, 09 Sep 2005 02:25
47 lines
2064 bytes
2064 bytes
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)
{
};
Re: TIdTCPClient Base Class
Author: Remy Lebeau (TeamB)
Date: Fri, 09 Sep 2005 03:40
Date: Fri, 09 Sep 2005 03:40
18 lines
1554 bytes
1554 bytes
"Curt" <noemailaddress> wrote in message news:4320f1c9$1@newsgroups.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
Re: TIdTCPClient Base Class
Author: Curt
Date: Fri, 09 Sep 2005 03:54
Date: Fri, 09 Sep 2005 03:54
26 lines
1739 bytes
1739 bytes
Thank you. "Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message news:43210433@newsgroups.borland.com... > > "Curt" <noemailaddress> wrote in message > news:4320f1c9$1@newsgroups.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 > >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads