NVAPI Reference Documentation
Release 435: August 22

Deprecation Warnings

All legacy APIs will be deprecated if a replacement is available. When an API is deprecated, it still remains in the code. However, any attempts to use it will result in a warning message recommending alternative APIs and stating that the API will be removed in the future - the API will not remain in the code indefinitely.

As the API is not removed immediately, this gives the client time to bring their code into compliance with the new APIs.

Example of Some Warnings

error C2220: warning treated as error - no 'object' file generated
warning C4996: 'NvAPI_GPU_GetConnectedOutputs': Do not use this function -
it is deprecated in release 290.

How to Avoid Warnings

There are two courses of action that clients should take to avoid being presented with the warnings. These include a short term phase and a long term phase:

Phase-I (short term):

  • Option 1: Ignore the warning by using CFFLAG. Add “CFLAGS += -wd4996” and “CFLAGS += -wd4995”
  • Option 2: Don't use CFLAG, which treats the warning as an error. Remove “CFLAGS += -WX” from the make file.

Phase-II (long term): Clients need to avoid using the deprecated APIs and switch to the replacement APIs.

Copyright (c) 2007-2019 NVIDIA Corporation. All rights reserved.