EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Issues adding BPLs to C++ Builder 2007

Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.
#21460
Posted: 09/12/2012 10:52:28
by Jamie Otterstetter (Standard support level)
Joined: 11/03/2010
Posts: 7

Hello, I'm having a couple issues adding all the transports BPLs and the zip BPL to C++ builder 2007. I'm able to add all the transports BPLs with the exception of ClouldBBoxB11, when I attempt to add it I get an error that says "Cannot load package 'ClouldBBoxB11.' It contains unit 'Sbdiskfsadapter,' which is also contained in package 'SFTPBBoxCliB11'", any thoughts? I've rebuilt all the BPLs and such from source (this is a requirement of our workflow), so something could have gone wrong there, but that all seemed to work correctly. As a side note if I continue on without adding the Cloud BPL I get errors when building. The first is in SBSSHCommon.hpp, and it is "Overloadable operator expected", it's in the chunk of code:

Code
#if defined(MANAGED_INTERFACE_OPERATORS)
operator _di_IElSSHAuthHandlerContainer()
{
    _di_IElSSHAuthHandlerContainer intf;
    GetInterface(intf);
    return intf;
}
#else
operator IElSSHAuthHandlerContainer*(void) { return (IElSSHAuthHandlerContainer*)&_IElSSHAuthHandlerContainer;
#endif


It complains about what's in between the #else and #endif. I searched on your forums and saw something similar an you mentioned that there was a C++ builder bug that was causing this and that commenting out the offending code was fine, this did solve the issue, but I ran into another one. In SBSSHHandlers.hpp I see what appears to be two identical lines:

Code
__fastcall virtual TElCustomSSHSubsystemHandler(Sbsshcommon::TElSSHTunnelConnection* Connection)/*overload*/;
__fastcall virtual TElCustomSSHSubsystemHandler(Sbsshcommon::TElSSHTunnelConnection* Connection)/*overload*/;


This produces an error saying "E2238 Multiple declaration for '__fastcall virtual TElCustomSSHSubsystemHandler(Sbsshcommon::TElSSHTunnelConnection* Connection)'". So I applied the same principle and commented it out as well, not sue this was the right solution, but it got me moving to the next error that is related to the same issue. This code appears further down in the same file:

Code
#pragma option push -w-inl
/* TElCustomSSHSubsystemHandler.Create */ inline __fastcall virtual TElShellSSHSubsystemHandler(Sbsshcommon::TelSSHTunnelConnection* Connection)/* overload */ : TElCustomSSHSubsystemHandler(Connection) {}
#pragma option pop
#pragma option push -w-inl
/* TElCustomSSHSubsystemHandler.CreateDelayed */ inline __fastcall virtual TElShellSSHSubsystemHandler(Sbsshcommon::TelSSHTunnelConnection* Connection)/* overload */ : TElCustomSSHSubsystemHandler(Connection) {}
#pragma option pop
#pragma option push -w-inl
/* TElCustomSSHSubsystemHandler.Destroy*/ inline __fastcall virtual ~TElShellSSHSubsystemHandler(void) { }
#pragma option pop


The first two sets of push/pop are identical except one comment says .CreateDelayed instead of .Create. Commenting the first one out (commented out the push to pop lines) seems to keep me moving to the next error, which the same as this one but in another class further down, commenting that out seems to resolve all the issues. So at this point things are building, but was commenting out the code I've mentioned going to cause issues?

This is all with the latest version of Secure BlackBox (v9.1.217, downloaded yesterday) for VCL, it was all built using the SecBBoxB11.groupproj.

Thanks,
Jamie
#21461
Posted: 09/12/2012 11:02:34
by Eugene Mayevski (EldoS Corp.)

Regarding the adapter:

The file SBDiskFSAdapter must be included to BaseBBox package, but in Builder 2007 (and only in that one version) it is not included. This causes the file to be included implicitly to other packages. What you need to do is
1) open BaseBBoxB11.cbproj in notepad
2) find "3007" there (3007 stands for CustomFSAdapter reference)
3) apply the following addition:

Quote

<DelphiCompile Include="..\Sources\SBCustomFSAdapter.pas">
3007
</DelphiCompile>
<DelphiCompile Include="..\Sources\SBDiskFSAdapter.pas">
3008
</DelphiCompile>


As you see, we *append* new included file, SBDiskFSAdapter.

Then you recompile packages and that's it.


About invalid header files commenting out that faulty declarations should not cause any problems -- header files are for use in your application and in 99% of cases I don't think one will ever need to reference TElShellSSHSubsystemHandler from Builder. IF you ever need to use that class and IF you come across the problem, then we'll try to solve it.


Sincerely yours
Eugene Mayevski
#21462
Posted: 09/12/2012 11:05:08
by Eugene Mayevski (EldoS Corp.)

Looks like the forum engine spoils tags, so the quoted piece of the package file should not be copy-pasted, but applied smartly.


Sincerely yours
Eugene Mayevski
#21463
Posted: 09/12/2012 11:08:10
by Jamie Otterstetter (Standard support level)
Joined: 11/03/2010
Posts: 7

Sounds good, thanks for the quick response!
#21468
Posted: 09/12/2012 15:51:41
by Jamie Otterstetter (Standard support level)
Joined: 11/03/2010
Posts: 7

Worked great, thanks!
Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.

Reply

Statistics

Topic viewed 657 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!