LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Solved!
Go to solution

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.

John O'C
Staff Test Systems Engineer
Woodward, Inc.
Skokie, Illinois, USA

"Life is not a journey to the grave with the intention of arriving safely
in a pretty and well preserved body, but rather to skid in broadside,
thoroughly used up, totally worn out, and loudly proclaiming...
Wow...What a Ride!"
0 Kudos
Message 1 of 2
(6,819 Views)
Solution
Accepted by topic author johnoc

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):

 

sdk.png

Message 2 of 2
(6,769 Views)