BEIC
BEIC

Reputation: 77

Cannot build NVAPI CustomTiming.cpp sample: 7x error LNK2019: unresolved external symbol

I'm trying to compile the CustomTiming.cpp sample from the NVAPI SDK and I'm getting the following errors:

1>------ Build started: Project: CustomTiming, Configuration: Debug Win32 ------
1>  CustomTiming.cpp
1>CustomTiming.obj : error LNK2019: unresolved external symbol _NvAPI_EnumPhysicalGPUs referenced in function "enum _NvAPI_Status __cdecl GetConnectedDisplays(unsigned long *,unsigned long *)" (?GetConnectedDisplays@@YA?AW4_NvAPI_Status@@PAK0@Z)
1>CustomTiming.obj : error LNK2019: unresolved external symbol _NvAPI_Initialize referenced in function _wmain
1>CustomTiming.obj : error LNK2019: unresolved external symbol _NvAPI_GPU_GetConnectedDisplayIds referenced in function "enum _NvAPI_Status __cdecl GetConnectedDisplays(unsigned long *,unsigned long *)" (?GetConnectedDisplays@@YA?AW4_NvAPI_Status@@PAK0@Z)
1>CustomTiming.obj : error LNK2019: unresolved external symbol _NvAPI_DISP_GetTiming referenced in function "enum _NvAPI_Status __cdecl ApplyCustomDisplay(void)" (?ApplyCustomDisplay@@YA?AW4_NvAPI_Status@@XZ)
1>CustomTiming.obj : error LNK2019: unresolved external symbol _NvAPI_DISP_TryCustomDisplay referenced in function "enum _NvAPI_Status __cdecl ApplyCustomDisplay(void)" (?ApplyCustomDisplay@@YA?AW4_NvAPI_Status@@XZ)
1>CustomTiming.obj : error LNK2019: unresolved external symbol _NvAPI_DISP_SaveCustomDisplay referenced in function "enum _NvAPI_Status __cdecl ApplyCustomDisplay(void)" (?ApplyCustomDisplay@@YA?AW4_NvAPI_Status@@XZ)
1>CustomTiming.obj : error LNK2019: unresolved external symbol _NvAPI_DISP_RevertCustomDisplayTrial referenced in function "enum _NvAPI_Status __cdecl ApplyCustomDisplay(void)" (?ApplyCustomDisplay@@YA?AW4_NvAPI_Status@@XZ)
1>J:\WORK\DEVELOPMENT\NEW C++ DEV\CustomTiming\Debug\CustomTiming.exe : fatal error LNK1120: 7 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I have no idea where to find the missing external symbols, any gurus here to help?

Upvotes: 1

Views: 492

Answers (1)

BEIC
BEIC

Reputation: 77

I just found out on the following link that those functions are (unfortunately) part of the NDA version of NVAPI. How can I force any display resolution/timing I want?

EDIT Correction: Not true, they are included in the public release version, the sample code worked after I properly included the required dlls.

Upvotes: 2

Related Questions