🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.socket
4 messages
4 total messages Started by Peter Offenwanger Wed, 23 Jan 2008 22:58
TTcpClient->Active
#558
Author: Peter Offenwanger
Date: Wed, 23 Jan 2008 22:58
11 lines
1324 bytes
I am using a TTcpClient and it works fine if I set the Active property 
to true in the object inspector. If I try to change the Active property 
in code with a (TCP->Active = true;) I get the following error. Is this 
somehow caused by something I may have done.

[Linker Error] Error: Unresolved external '__fastcall 
Sockets::TBaseSocket::SetActive(char)'


Thanks for the Assistance.
	Peter
Re: TTcpClient->Active
#559
Author: Remy Lebeau (TeamB)
Date: Wed, 23 Jan 2008 23:18
15 lines
1368 bytes
"Peter Offenwanger" <unigeek@gmail.com> wrote in message 
news:4797c6c0@newsgroups.borland.com...

> [Linker Error] Error: Unresolved external '__fastcall 
> Sockets::TBaseSocket::SetActive(char)'

There is no SetActive() method in TBaseSocket that takes a char as input. 
TBaseSocket::SetActive() takes a bool instead:

    void __fastcall SetActive(bool Value);
    __property bool Active = {read=FActive, write=SetActive, default=0};


Gambit
Re: TTcpClient->Active
#560
Author: Peter Offenwanger
Date: Thu, 24 Jan 2008 01:08
42 lines
2269 bytes
Remy Lebeau (TeamB) wrote:
> "Peter Offenwanger" <unigeek@gmail.com> wrote in message 
> news:4797c6c0@newsgroups.borland.com...
> 
>> [Linker Error] Error: Unresolved external '__fastcall 
>> Sockets::TBaseSocket::SetActive(char)'
> 
> There is no SetActive() method in TBaseSocket that takes a char as input. 
> TBaseSocket::SetActive() takes a bool instead:
> 
>     void __fastcall SetActive(bool Value);
>     __property bool Active = {read=FActive, write=SetActive, default=0};
> 
> 
> Gambit
> 

I am aware that it should be a bool but I am passing it a bool and I get 
the Linker Error.

My code compiles and runs and communicates over the TCP connection but 
if I add the following code.

void __fastcall TISDMainForm::Button1Click(TObject *Sender)
{
	bool SetSocketActive;

   	SetSocketActive = true;
	MyTcpClient->Active = SetSocketActive;
}


I get

[Linker Error] Error: Unresolved external '__fastcall 
Sockets::TBaseSocket::SetActive(char)'

I tested this in another program that was empty except for this code and 
it worked fine so there must be something in my project that is causing 
  this. I am not overriding anything in Sockets. I guess I will have to 
reassemble the project piece by piece until I find the part that causes 
this.
Re: TTcpClient->Active
#562
Author: Remy Lebeau (TeamB)
Date: Thu, 24 Jan 2008 17:32
19 lines
1638 bytes
"Peter Offenwanger" <unigeek@gmail.com> wrote in message 
news:4797e538$1@newsgroups.borland.com...

> void __fastcall TISDMainForm::Button1Click(TObject *Sender)
> {
> bool SetSocketActive;
>
>   SetSocketActive = true;
> MyTcpClient->Active = SetSocketActive;
> }

Do you have SetSocketActive defined anywhere else, by chance?  Maybe as a 
function that returns a 'char'?  Or maybe there is a macro that is 
redefining 'true' to be a 'char' instead of a 'bool'?  Do you have the same 
error if you change the variable's name, or remove the variable altogether?


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