I get:
d:edk2SetVariablePkgSetVariablePkg.dsc(...): error 4000: Instance of library class [OpensslLib] is not found
in [d:edk2CryptoPkgLibraryBaseCryptLibBaseCryptLib.inf] [X64]
consumed by module [d:edk2SetVariablePkgSetVariable.inf]
when I try to compile my EDK2 project.
I am trying to use the RandomBytes()
function, so I included <Library/BaseCryptLib.h>
. This is what my .dsc file looks like:
[Defines]
PLATFORM_NAME = SetVariablePkg
PLATFORM_GUID = 4E85F56A-569F-41FC-AA95-C0C42519E406
PLATFORM_VERSION = 0.1
DSC_SPECIFICATION = 0x00010005
SUPPORTED_ARCHITECTURES = X64
BUILD_TARGETS = DEBUG|RELEASE
OUTPUT_DIRECTORY = SetVariablePkg/Build
[LibraryClasses]
UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
[Components]
SetVariablePkg/SetVariable.inf
This is what my .inf file looks like:
[Defines]
INF_VERSION = 0x00010006
BASE_NAME = SetVariable
FILE_GUID = 53EF0710-78CA-40EF-AFF8-CAC311DBEB38
MODULE_TYPE = UEFI_APPLICATION
VERSION_STRING = 0.1
ENTRY_POINT = UefiMain
[Sources]
SetVariable.c
SetVariable.h
[Packages]
MdePkg/MdePkg.dec
[LibraryClasses]
UefiLib
MemoryAllocationLib
UefiBootServicesTableLib
UefiApplicationEntryPoint
UefiRuntimeServicesTableLib
BaseCryptLib
[Protocols]
gEfiSimpleTextInputExProtocolGuid
Those are my includes in the header file:
#include <Uefi.h>
#include <Library/UefiLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/BaseCryptLib.h>
#include <Protocol/Variable.h>
#define Buffer 256
I am on Windows 10 and I use the VS2019 compiler. Does anyone know how I could fix the error?