Hi
After installing the lastest version of SecureBridge (6.4.6) there is a compilation error in C++ Builder 2010 IDE:
[BCC32 Error] Scsshsocket.hpp(76): E2090 Qualifier 'Winsock' is not a class or namespace name
It points to the followin piece of code in Scsshsocket.hpp:
class DELPHICLASS IPAddress;
class PASCALIMPLEMENTATION IPAddress : public System::TObject
{
typedef System::TObject inherited;
private:
sockaddr_in *FSockAddr;
public:
__fastcall IPAddress(Winsock::PSockAddrIn SockAddr); <--- error here
HIDESBASE System::UnicodeString __fastcall ToString(void);
public:
/* TObject.Destroy */ inline __fastcall virtual ~IPAddress(void) { }
};
Full parser context
Unit1.cpp(6): #include Unit1.h
Unit1.h(91): #include C:\Program Files (x86)\Devart\SecureBridge for RAD Studio 2010\Include\ScSFTPClient.hpp
ScSFTPClient.hpp(22): #include C:\Program Files (x86)\Devart\SecureBridge for RAD Studio 2010\Include\Scbridge.hpp
Scbridge.hpp(30): #include C:\Program Files (x86)\Devart\SecureBridge for RAD Studio 2010\Include\Screaderwriter.hpp
Screaderwriter.hpp(21): #include C:\Program Files (x86)\Devart\SecureBridge for RAD Studio 2010\Include\Scssh2datahandler.hpp
Scssh2datahandler.hpp(28): #include C:\Program Files (x86)\Devart\SecureBridge for RAD Studio 2010\Include\Scsshsocket.hpp
Scsshsocket.hpp(34): namespace Scsshsocket
Scsshsocket.hpp(68): class IPAddress
Steps to reproduce:
1. Create a new VCL Forms application
2. Place TscSFTPClient on the form
3. Compile the project
Bertrand
Qualifier 'Winsock' is not a class or namespace name with BCB 2010 and SB 6.4.6
Re: Qualifier 'Winsock' is not a class or namespace name with BCB 2010 and SB 6.4.6
The same problem also occurs with the XE version!
Re: Qualifier 'Winsock' is not a class or namespace name with BCB 2010 and SB 6.4.6
For successful compilation, add a string #include "WinSock.hpp" to ScSSHSocket.hpp, and replace PSockAddr with PSOCKADDR in the SSHClientDemo.срр and SSHClientDemo.h units.
Re: Qualifier 'Winsock' is not a class or namespace name with BCB 2010 and SB 6.4.6
My solution was to replace Winsock::PSockAddrIn by Winsock2::PSockAddrIn in two locations in ScSSHSocket.hpp. That seems to be enough. Are there reasons to avoid this simple solution.
Re: Qualifier 'Winsock' is not a class or namespace name with BCB 2010 and SB 6.4.6
We provided a problem solution, that works in different C++ Builder versions. Your approach doesn't solve the problem in C++Builder versions lower than XE2 (an error will be generated: "E2090 Qualifier 'Winsock2' is not a class or namespace name").ppirila wrote:My solution was to replace Winsock::PSockAddrIn by Winsock2::PSockAddrIn in two locations in ScSSHSocket.hpp. That seems to be enough. Are there reasons to avoid this simple solution.