Jump to content
ivp

Can't compile samples on CB2009

Recommended Posts

Hi.

Can you help me?

I can't compile samples on CB2009.

 

Here is steps:

  • I have installed OverbyteIcsV8.61 from .\Install\CB2009Install.groupproj 
  • Added to Include Path folder .\Lib\Debug\Win32\D2009
  • Open the sample project:
    .\Samples\cpp\Internet\CB2009\OverbyteIcsHttpTst.cbproj
  • Project -> Build
  • Got error
    [BCC32 Fatal Error] sspi.h(61): F1003 Error directive: You must define one of SECURITY_WIN32, SECURITY_KERNEL, or 
  • Add SECURITY_WIN32 to project:
    Project -> Options -> C++ Compiler -> Directories and Conditondls -> Conditional defines
    Add SECURITY_WIN32
  • Project -> Build
  • Got strange error:
[BCC32 Error] Overbyteicssspi.hpp(87): E2293 ) expected

It is in the .\Lib\Debug\Win32\D2009\OverbyteIcsSspi.hpp:

...
//-- var, const, procedure ---------------------------------------------------
static const unsigned SEC_E_INVALID_HANDLE = 0x80090301;      // <---- It is the line with error
...

 

The same situation with other projects:

  • .\Samples\cpp\Internet\CB2009\OverbyteIcsWebServ.cbproj
  • .\Samples\cpp\Internet\CB2009\OverbyteIcsHttpPg.cbproj
  • .\Samples\cpp\Internet\CB2009\OverbyteIcsHttpsTst.cbproj

 

How it can be fixed?

Share this post


Link to post

The hpp file is created by the compiler when you install the components. The source code is actually OverbyteIcsSspi.pas.

This source code reference several windows SDK header files. Maybe you have a different Windows SDK?

Also, look at the source code OverbyteIcsSspi.pas: it the file I have, the symbol SEC_E_INVALID_HANDLE is commented out.

Share this post


Link to post

I have this same problem with 10.3 (Rio). Everything appeared to install correctly. Went to compile my project that has always used ICS, and got the exact same error as you about having to define SECURITY_WIN32 and added it as you did. Then says that a ) is expected on line 88 of OverbyteIcsSspi.hpp. Will try commenting that line out per Francois' suggestion, as the HPP file is generated automatically. Installed using the C++ personality/projects.

 

Will let you know if commenting it out does anything.

Thanks


Update: compiled okay. Haven't made it through to linking yet, but this is progress. Note: App does *not* use SSL.

Edited by w0wbagger

Share this post


Link to post

Same problem here with 10.3.2. Just updated my ICS components to the latest recommended release (8.61).

 

I get these errors just trying to compile an empty C++ VCL project with a TSslHttpCli component on it.
 

[bcc32c Error] sspi.h(65): You must define one of SECURITY_WIN32, SECURITY_KERNEL, or
[bcc32c Error] sspi.h(66): SECURITY_MAC
[bcc32c Error] sspi.h(2288): unknown type name 'PUNICODE_STRING'

 

I defined 'SECURITY_WIN32' in the project options but now I get this error:

[bcc32c Error] OverbyteIcsSspi.hpp(88): expected ')'
  OverbyteIcsSspi.hpp(88): to match this '('

Commented out the SEC_E_INVALID_HANDLE line in the *.hpp files (for 32-bit and 64-bit) and now it compiles and builds (both 32-bit and 64-bit)... still testing though.

 

Edited by HTMLValidator.com
  • Thanks 1

Share this post


Link to post
19 hours ago, HTMLValidator.com said:

Commented out the SEC_E_INVALID_HANDLE line in the *.hpp files

It is not very good solution - the source code is in *.pas.

Share this post


Link to post

A lot of time has passed from initial post, but I was in vacation..

 

I have solved the compiling errors.

Here is the patch.

 

FPiette, How to merge this changes on main branch?

Can I make a pull request or something like this?

 

 

ics-CB2009-fix-99-ALL.patch

Share this post


Link to post

Your patch should be against the latest SVN version 1435, not a three month old version. 

 

Some of your changes in OverbyteIcsCB2009Run.cbproj have already been done. 

 

Angus

 

Share this post


Link to post

Some of your changes in OverbyteIcsCB2009Run.cbproj have already been done. 

 

Yes, you are right.

 

But I have checked right now. 

The patch is successfully applied to the latest revision (1435) too. Without any changes.

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×