error: implicit declaration of function 'GetActiveProcessorCount' is not valid in C99. Make sure that you include the prototype for the function.

I get the following error:

error: implicit declaration of function 'GetActiveProcessorCount' is not valid in C99. Make sure that you include the prototype for the function.

I've included windows.h

which includes winbase.h

Winbase.h contains the prototype for the function in the above error message.

If I disable 'Require the function prototypes' and 'Building with the C99 extensions', I get the following error:

error: Undefined symbol "_GetActiveProcessorCount" referenced in "c:\Users\Public\Documents\National Instruments\CVI\HDLC\cvibuild. HDLC_RandD\Debug\HDLC_RandD.obj ".

I work in the ICB 2013 SP2.

Why I get this error.

This function is only valid in Windows 7 and later versions. Because the ICB 2013 still supports Windows XP, this feature is excluded by default from Windows headers that are provided with CVI. If you do not need to worry about the versions of Windows prior to Windows 7, however, you can include it yourself, by adding the following macro in the dialog box options generation CVI (be sure to include for all configurations):

Tags: NI Software

Similar Questions

Maybe you are looking for