Hi All,
I am having trouble linking a plugin which I am writing correctly.
I am using the nvEncodeAPI and following the documentation here:
https://docs.nvidia.com/video-technologies/video-codec-sdk/nvenc-video-encoder-api-prog-guide/index.html#directx-9
but I cannot compile?
I am currently linking against:
nvencodeapi.lib
cudart.lib
but I am getting a linking error :
unresolved external symbol NvEncOpenEncodeSessionEx
I have cuda toolkit installed what else should I be linking with?
Kindest
Steve
This was not a linking issue,
for anyone stuck here you need to get the function as a pointer from a struct
//create our function list provided by nvidia
NV_ENCODE_API_FUNCTION_LIST functionList;
//create the encode instance
NVENCSTATUS status;
status = NvEncodeAPICreateInstance(&functionList);
if (status == NV_ENC_ERR_INVALID_PTR) {
fprintf_s(data.file, "Error creating Nvidia encode instance.\n");
return NULL;
}
//create the dx11 encoder device
NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS device;
device.deviceType = NV_ENC_DEVICE_TYPE_DIRECTX;
//create the encoder pointer which we will make all our calls too
void* encoderHandle;
//now lets open an encoding session
status = functionList.nvEncOpenEncodeSessionEx(&device, &encoderHandle);