Page 1 of 1

Building RCF Static Library with Visual Studio 2017

Posted: Thu Sep 06, 2018 12:46 am
by sh_cheah
Hi folks,
I encountered the following error while trying to build RCF 3.0 into a static library using Visual Studio 2017. Any idea what I am missing here?

1>------ Build started: Project: RCFNet, Configuration: Debug Win32 ------
1>RCF.cpp
1>c:\source\wd\remotecallframework\rcf-3.0.251\src\rcf\schannel.cpp(548): error C2664: 'SECURITY_STATUS (SEC_CHAR *,SEC_CHAR *,unsigned long,void *,void *,SEC_GET_KEY_FN,void *,PCredHandle,PTimeStamp)': cannot convert argument 2 from 'const char [45]' to 'SEC_CHAR *'
1>c:\source\wd\remotecallframework\rcf-3.0.251\src\rcf\schannel.cpp(555): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
1>Done building project "RCFNet.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Re: Building RCF Static Library with Visual Studio 2017

Posted: Thu Sep 06, 2018 10:22 am
by jarl
I'm unable to reproduce this on my machine, but in any case if you change the code in Schannel.cpp to this, you should be fine:

Code: Select all

        SECURITY_STATUS status = getSft()->AcquireCredentialsHandle(
            NULL,
            (SEC_CHAR *) UNISP_NAME,