__declspec(dllimport) decorates the name to __imp__nvmlInit (two underscores)
which is not what I want either. In fact the LIB exports names in both
__imp_nvmlInit (one underscore between imp and nvmlInit) and nvmlInit, but not __imp__nvmlInit (two underscores) nor _nvmlInit
Yes I know, what I'm trying to say is extern "C" nvmlReturn_t __declspec(dllimport) nvmlInit(...); will try to resolve __imp__nvmlInit whereas the exported function is really __imp_nvmlInit.