10-11-2019 11:40 AM
I am using the PXIe-1078 box with the PXIe-4080 Multimeter and PXIe2636 Switch Matrix. I’m using Visual Basic 2013 C++ to write the program being used with the products.
I am trying to use the C:\Program Files (x86)\IVI Foundation\IVI\Include and C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Include directories in order to use the “niSwitch.h” and “nidmm.h” header files. However the C linkage is causing problems because there are two functions, one in “visa.h”(line 147) and one in “ivi.h”(line 1446) called Ivi_BufWrite that have different parameters and cannot be overloaded thus causing me to be unable to build my project.
I have been been unable to determine what is causing this problem nor how to fix it and have come here for suggestions.
Solved! Go to Solution.
10-19-2019 05:20 AM
Im having the same issue with a KEYSIGHT DMM and NIDMM. Not much out there on this.
Have you been able to solve this issue?
One possible solution that i have been trying:
-Using Either VISA or IVI but not both for our instruments.
Ill update if i am able to find a solution.
10-21-2019 07:34 AM
I have solved the issue by modifying one of the IviBufwrite functions, namely the one contained within the "ivi.h" file at line 1446 by changing the ViBuf buf to a ViConstBuf. This required modifying the header files which is not ideal, however, changing it to a Const is relatively safe but I don't know if it will cause any unexpected issues going forward. Non so far.
02-14-2020 09:36 AM
I'm having the same problem. NI support acknowledges a bug and cites the post marked as a "solution" in this post as the "official solution NI supports."
For some reason I can't really explain, it seems to be going in to an #if that it shouldn't be; commenting out the contents (line 1452 in ivi.h) also seems to resolve it (which is cleaner in my opinion):
The above said, I'm working with inherited code with about a billion dependencies, so I haven't ruled out external factors. At some point I intend to attempt a simpler reproducing case to see if it persists.
Finally, if you're using a version of VISA prior to 2017, this shouldn't be an issue:
Revision 5.8, October 17, 2017
Defined new const types and updated public entry points to use the correct const type for input parameters.