LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Linking error I don't understand

Hi,

I'm getting the following Link error:
Undefined Symbol '_hp3771x_ResultsFrequencyMeas_Q@12' reference in your 'filename.c'.

My file include the hp3771.h file which includes the symbol:
ViStatus _VI_FUNC hp3771x_resultsFrequencyMeas_Q(
ViSession instrumentHandle,
ViInt16 measurementType,
ViPReal64 measurementResult);


Could my error be related to this symbol?
If so, what is the meaning of @12?
..and most importantly, why is it not recognized? (this is the only error and I'm using many functions in this lib.)

Thanks
Rafi
0 Kudos
Message 1 of 2
(3,010 Views)
When a C program is compiled, external function names are 'decorated' with other information. The convention normally is that __cdecl function names have a leading underscore attached, whilst __stdcall function names have a leading underscore and a suffix attached. The suffix is the '@' sign followed by an integer which in fact is the number of bytes in the parameter list (so @12 in you case means there are 12 bytes total in the parameters).

But to get back to your problem, the most obvious error is this. Compare:

Undefined Symbol '_hp3771x_ResultsFrequencyMeas_Q@12'

to

ViStatus _VI_FUNC hp3771x_resultsFrequencyMeas_Q

and see if you can see the difference!

If this was, however, a typo then it means t
hat the .h file does not correspond to the driver library (.c or .obj or .lib) file you are using.

--
Martin
--
Martin
Certified CVI Developer
Message 2 of 2
(3,010 Views)