Now I have OpenCL headers properly configured. It looks like there's more information if I make Visual Studio display the informational messages too.
Severity Code Description Project File Line Suppression State
Error C2259 'CLKeySearchDevice': cannot instantiate abstract class clKeyFinder E:\Source\Repos\BitCrack\KeyFinder\main.cpp 254
Message see declaration of 'KeySearchDevice::init' clKeyFinder E:\Source\Repos\BitCrack\KeyFinderLib\KeySearchDevice.h 42
Message 'void KeySearchDevice::init(const secp256k1::uint256 &,const secp256k1::uint256 &,int,const secp256k1::uint256 &,bool)': is abstract clKeyFinder E:\Source\Repos\BitCrack\KeyFinder\main.cpp 254
Message due to following members: clKeyFinder E:\Source\Repos\BitCrack\KeyFinder\main.cpp 254
Message see declaration of 'CLKeySearchDevice' clKeyFinder E:\Source\Repos\BitCrack\CLKeySearchDevice\CLKeySearchDevice.h 14
So apparently it's because KeySearchDevice::init is not defined. Maybe it must have been removed by the fork?
Found the problem.
The base class of CLKeySearchDevice, KeySearchDevice has a different init() method signature from the CLKeySearchDevice::init().
// KeySearchDevice.h
// Initialize the device
virtual void init(const secp256k1::uint256 &start, const secp256k1::uint256 &end, int compression, const secp256k1::uint256 &stride, bool randomMode) = 0;
// CLKeySearchDevice.h
// Initialize the device
virtual void init(const secp256k1::uint256 &start, int compression, const secp256k1::uint256 &stride);
Notice that
end and
randomMode parameters are missing from the subclass CLKeySearchDevice. Since KeySearchDevice::init() is abstract (it has
= 0 at the end), CLKeySearchDevice::init() does not override it and you get this error.
I think that while the maintainer was updating the CUDA code he forgot to update the classes in the OpenCL classes. We need to modify the code to pass the additional parameters, even if they go unused.