Qualifier 'Winsock' is not a class or namespace name with BCB 2010 and SB 6.4.6

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
blogin
Posts: 6
Joined: Tue 25 Feb 2014 11:01

Qualifier 'Winsock' is not a class or namespace name with BCB 2010 and SB 6.4.6

Post by blogin » Wed 01 Oct 2014 13:41

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

dbwi
Posts: 4
Joined: Fri 19 Sep 2014 19:39

Re: Qualifier 'Winsock' is not a class or namespace name with BCB 2010 and SB 6.4.6

Post by dbwi » Wed 01 Oct 2014 22:12

The same problem also occurs with the XE version!

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Qualifier 'Winsock' is not a class or namespace name with BCB 2010 and SB 6.4.6

Post by ViktorV » Thu 02 Oct 2014 09:59

For successful compilation, add a string #include "WinSock.hpp" to ScSSHSocket.hpp, and replace PSockAddr with PSOCKADDR in the SSHClientDemo.срр and SSHClientDemo.h units.

ppirila
Posts: 2
Joined: Sun 25 Jan 2015 14:54

Re: Qualifier 'Winsock' is not a class or namespace name with BCB 2010 and SB 6.4.6

Post by ppirila » Sun 25 Jan 2015 14:59

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.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Qualifier 'Winsock' is not a class or namespace name with BCB 2010 and SB 6.4.6

Post by ViktorV » Fri 30 Jan 2015 10:03

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.
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").

Post Reply