LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Xenroll.h Error

Solved!
Go to solution

I am trying to implement getting X.509 Certificates from a CA using LabWindows or LabView.  I started using LabWindows as most sample programs on the newt are in C .  However when I include the xenroll.h from c:\program files\national instruments\cvi85\sdk\include and the uuid.lib from  c:\program files\national instruments\cvi85\sdk\lib.

 

At this line of the xenroll.h file    

 

extern "C" IEnroll * WINAPI PIEnrollGetNoCOM(void);

 

I get the following errors:


 csi.c - 3 errors, 1 warning
  "Xenroll.h"(5608,8)   Warning: Empty declaration.
  "Xenroll.h"(5608,8)   syntax error; found 'string constant' expecting ';'.
  "Xenroll.h"(5608,8)   Unrecognized declaration.
  "Xenroll.h"(5608,20)   Redeclaration of 'IEnroll' previously declared at Xenroll.h:62.

 

This file comes directly from NI, why is there an error and how do I fix it?

 

Thanks

0 Kudos
Message 1 of 3
(3,346 Views)

This header apparently was not modified properly to allow it to be used by a C compiler. The extern "C" syntax is not supported by the CVI compiler. Apparently this library doesn't see much use; this header has included those extern "C" declarations at least since 1999, and no one has pointed this out before. You should replace extern "C" with EXTERN_C, which is used thoughout the rest of that file. Sorry again.

 

Mert A.

National Instruments

Message Edited by Mert A. on 10-28-2008 05:26 PM
0 Kudos
Message 2 of 3
(3,336 Views)
Solution
Accepted by topic author pknight12133123123

That fixed the error.

 

Thanks

0 Kudos
Message 3 of 3
(3,323 Views)