Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: AsyncPro unresolved external


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 7 - Last Post: Sep 20, 2017 1:52 AM Last Post By: Franco Pucci Threads: [ Previous | Next ]
Franco Pucci

Posts: 6
Registered: 6/15/07
AsyncPro unresolved external  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 18, 2017 10:19 AM
This one is a bit strange.
I am trying to set the wsAddress and wsPort property values in a TApdWinsock port component from an edit box - which I have done many times in the past with Builder 6.
If I do not try to set the wsAddress and wsPort values programmatically and set the values directly in the component properties at design time, everything works fine and I can use the component for comms.
What is even stranger is that I can set the wsMode property ok from the program.

ApdWinsockPort1->Open = false;
ApdWinsockPort1->WsAddress = IPAddress->Text; (this does not work)
ApdWinsockPort1->WsAddress = "192.168.8.100"; (this does not work)
ApdWinsockPort1->WsMode = wsClient; (this works)
ApdWinsockPort1->WsPort = Port->Text; (this does not work)
ApdWinsockPort1->WsPort = "5100"; (this also does not work)
ApdWinsockPort1->Open = true;

I get an "unresolved external - SetWsAddress" and "unresolved external - SetWsPort" error.

I believe all the include files are there:

#include <System.SysUtils.hpp>
#include <Vcl.ExtCtrls.hpp>
#include <Vcl.Tabs.hpp>
#include "RzTabs.hpp"
#include "AdPort.hpp"
#include "OoMisc.hpp"
#include "AdPacket.hpp"
#include "AdPort.hpp"
#include "AdWnPort.hpp"

Can anyone help? I am using C++Builder 10.2.
Remy Lebeau (Te...


Posts: 8,921
Registered: 12/23/01
Re: AsyncPro unresolved external  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 18, 2017 10:37 AM   in response to: Franco Pucci in response to: Franco Pucci
Franco Pucci wrote:

I get an "unresolved external - SetWsAddress" and "unresolved
external - SetWsPort" error.

Sounds like you are not linking to the package that implements the
component. That is not a coding issue, that is a project setup issue.

--
Remy Lebeau (TeamB)

Franco Pucci

Posts: 6
Registered: 6/15/07
Re: AsyncPro unresolved external  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 19, 2017 4:36 AM   in response to: Franco Pucci in response to: Franco Pucci
Franco Pucci wrote:
This one is a bit strange.
I am trying to set the wsAddress and wsPort property values in a TApdWinsock port component from an edit box - which I have done many times in the past with Builder 6.
If I do not try to set the wsAddress and wsPort values programmatically and set the values directly in the component properties at design time, everything works fine and I can use the component for comms.
What is even stranger is that I can set the wsMode property ok from the program.

ApdWinsockPort1->Open = false;
ApdWinsockPort1->WsAddress = IPAddress->Text; (this does not work)
ApdWinsockPort1->WsAddress = "192.168.8.100"; (this does not work)
ApdWinsockPort1->WsMode = wsClient; (this works)
ApdWinsockPort1->WsPort = Port->Text; (this does not work)
ApdWinsockPort1->WsPort = "5100"; (this also does not work)
ApdWinsockPort1->Open = true;

I get an "unresolved external - SetWsAddress" and "unresolved external - SetWsPort" error.

I believe all the include files are there:

#include <System.SysUtils.hpp>
#include <Vcl.ExtCtrls.hpp>
#include <Vcl.Tabs.hpp>
#include "RzTabs.hpp"
#include "AdPort.hpp"
#include "OoMisc.hpp"
#include "AdPacket.hpp"
#include "AdPort.hpp"
#include "AdWnPort.hpp"

Can anyone help? I am using C++Builder 10.2.

Hi Remy,
The component must be linked since I can use it if I set the property in the component properties box directly at design time. Its only when I try to set the property from an edit box string when running. In fact the program is running correctly using the Async component - I just can't set the port or address from edit boxes.
Remy Lebeau (Te...


Posts: 8,921
Registered: 12/23/01
Re: AsyncPro unresolved external  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 19, 2017 9:00 AM   in response to: Franco Pucci in response to: Franco Pucci
Franco Pucci wrote:

The component must be linked since I can use it if I set the property
in the component properties box directly at design time.

No, because the component is installed in the IDE itself, so it is easy
to find at design-time. Linking the component into the compiled
executable is completely different. The error you are getting is
because your project is not able to find the component's package when
the executable is linked.

--
Remy Lebeau (TeamB)
Martin van der ...

Posts: 54
Registered: 7/14/02
Re: AsyncPro unresolved external  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 19, 2017 5:33 AM   in response to: Franco Pucci in response to: Franco Pucci
If this happens only to string properties, perhaps the package is compiled to expect wide strings, but the header does not?

What happens if you pass a widestring like ApdWinsockPort1->WsAddress = L"192.168.8.100"; ?
Remy Lebeau (Te...


Posts: 8,921
Registered: 12/23/01
Re: AsyncPro unresolved external  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 19, 2017 9:00 AM   in response to: Martin van der ... in response to: Martin van der ...
Martin van der Plas wrote:

If this happens only to string properties, perhaps the package is
compiled to expect wide strings, but the header does not?

What happens if you pass a widestring like ApdWinsockPort1->WsAddress
= L"192.168.8.100"; ?

That wouldn't make any difference. The header would still be declaring
the property the same way as before.

--
Remy Lebeau (TeamB)
Franco Pucci

Posts: 6
Registered: 6/15/07
Re: AsyncPro unresolved external  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 20, 2017 1:26 AM   in response to: Franco Pucci in response to: Franco Pucci
Franco Pucci wrote:
This one is a bit strange.
I am trying to set the wsAddress and wsPort property values in a TApdWinsock port component from an edit box - which I have done many times in the past with Builder 6.
If I do not try to set the wsAddress and wsPort values programmatically and set the values directly in the component properties at design time, everything works fine and I can use the component for comms.
What is even stranger is that I can set the wsMode property ok from the program.

ApdWinsockPort1->Open = false;
ApdWinsockPort1->WsAddress = IPAddress->Text; (this does not work)
ApdWinsockPort1->WsAddress = "192.168.8.100"; (this does not work)
ApdWinsockPort1->WsMode = wsClient; (this works)
ApdWinsockPort1->WsPort = Port->Text; (this does not work)
ApdWinsockPort1->WsPort = "5100"; (this also does not work)
ApdWinsockPort1->Open = true;

I get an "unresolved external - SetWsAddress" and "unresolved external - SetWsPort" error.

I believe all the include files are there:

#include <System.SysUtils.hpp>
#include <Vcl.ExtCtrls.hpp>
#include <Vcl.Tabs.hpp>
#include "RzTabs.hpp"
#include "AdPort.hpp"
#include "OoMisc.hpp"
#include "AdPacket.hpp"
#include "AdPort.hpp"
#include "AdWnPort.hpp"

Can anyone help? I am using C++Builder 10.2.
Thanks Guys,
I will try your suggestions and let you know the results.
Franco Pucci

Posts: 6
Registered: 6/15/07
Re: AsyncPro unresolved external  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 20, 2017 1:52 AM   in response to: Franco Pucci in response to: Franco Pucci
Franco Pucci wrote:
This one is a bit strange.
I am trying to set the wsAddress and wsPort property values in a TApdWinsock port component from an edit box - which I have done many times in the past with Builder 6.
If I do not try to set the wsAddress and wsPort values programmatically and set the values directly in the component properties at design time, everything works fine and I can use the component for comms.
What is even stranger is that I can set the wsMode property ok from the program.

ApdWinsockPort1->Open = false;
ApdWinsockPort1->WsAddress = IPAddress->Text; (this does not work)
ApdWinsockPort1->WsAddress = "192.168.8.100"; (this does not work)
ApdWinsockPort1->WsMode = wsClient; (this works)
ApdWinsockPort1->WsPort = Port->Text; (this does not work)
ApdWinsockPort1->WsPort = "5100"; (this also does not work)
ApdWinsockPort1->Open = true;

I get an "unresolved external - SetWsAddress" and "unresolved external - SetWsPort" error.

I believe all the include files are there:

#include <System.SysUtils.hpp>
#include <Vcl.ExtCtrls.hpp>
#include <Vcl.Tabs.hpp>
#include "RzTabs.hpp"
#include "AdPort.hpp"
#include "OoMisc.hpp"
#include "AdPacket.hpp"
#include "AdPort.hpp"
#include "AdWnPort.hpp"

Can anyone help? I am using C++Builder 10.2.
Got it! My include files directory was pointed to my previous installation of Async - thanks for the help. All working fine now.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02