Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5339

Imitate GCC attributes in CVI

$
0
0

I'm presently working on remote control of the UHF Lock In Amplifier from Zurich Instruments. A header file provided by the company as an API for C makes heavy use of the GCC attributes.

Example lines:

 

__attribute__((deprecated)) const ZIVariable_Defined_By_Company

[...]

typedef ZIDefinedType_enum DEPRECATED(ziAPIOtherType);

 

Is there some way (a header file perhaps) to add this functionality to the CVI compiler? Or otherwise to trick the API into ignoring it? This is important because when I include the lines:


#define __attribute__(decl)
#define __deprecated    __attribute__((deprecated))
#define DEPRECATED_MSG_ATTRIBUTE(msg) __attribute((deprecated((msg)))

#include "APIfilename.h"

 

I repeatedly get the error "Redeclearation of 'deprecated'." from the typedef lines.  I can't reasonably fix every instance in their file; moreover, I would prefer to leave the file they provided unchanged and fix it on my end.


Viewing all articles
Browse latest Browse all 5339

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>