09-19-2014 01:29 PM
I am getting the following error:
error: implicit declaration of function 'GetActiveProcessorCount' is invalid in C99. Make sure that you include the function prototype.
I have included windows.h
which includes winbase.h
Winbase.h contains the prototype for the function called out in the error message above.
If I disable 'Require function prototypes' and 'Build with 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 am working in CVI 2013 SP2.
Why am I getting this error.
Solved! Go to Solution.
09-22-2014 03:53 PM
That function is only valid in Windows 7 and later. Because CVI 2013 still supports Windows XP, that function is excluded by default from the Windows headers that ship with CVI. If you don't need to worry about Windows versions older than Windows 7, however, you can include it yourself, by adding the following macro to the CVI build options dialog (remember to include it for all configurations):