LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot compile project in CVI 2009 that was previously opened in CVI 2010

Solved!
Go to solution

Thanks for these files.  It appears that you've run into this known issue, but I'm unsure why installing VISA 5.0.3 didn't resolve it for you.  I'm guessing your project is referencing older versions of the VISA header files.  Whatever the case, disabling extended Variables/Watch window displays should resolve the issue for you.

 

Please let me know if it does not.

 

NickB

National Instruments

0 Kudos
Message 11 of 18
(1,552 Views)

Unfortunately, that was already disabled in my environment section.  So the problem still exists if I do that.

 

For VISA not working, I blame Agilent IO Control.  We recently installed their IO for one of their equipment we were testing, and doing so f's up your USB ports and replaces critical NI dlls, one of which may have been visa.dll.

 

I have reinstalled MAX and other software to fix that issue and other programs seem to be working just fine that use VISA, but not sure why it exists with this program.

 

I may just try to create a new project with this source code.

0 Kudos
Message 12 of 18
(1,550 Views)

Hmm... I've never seen one of those two workaround not work - very bizarre.  The one other thing you could try is adding a call to viGetAttribute somewhere in one of your source files.  It doesn't really matter where, there just needs to be a reference for the linker to resolve.  If that doesn't work, I'm afraid I'm out of suggestions for the time being.

 

NickB

National Instruments

0 Kudos
Message 13 of 18
(1,547 Views)

Actually, now that I look at the crash dump a little more closely, it appears you're running into a variation of this issue.  I'll update the description of that known issue to be more general the next time I'm able to update that document.

 

To verify, could you please comment out the line:

 

#pragma soft_reference (viGetAttribute);

 

in Visa.h and then try to build.  My guess is that you should get compile errors when building in CVI 2009.  If you correct those compile errors, you should be able to re-introduce the pragma and build without crashing.

 

Sorry for all the confusion...

 

NickB

National Instruments

0 Kudos
Message 14 of 18
(1,533 Views)

This is getting interesting now...

 

I commented out that line, then re-compiled and I had no errors to fix.  (That's a first Smiley Tongue)

 

So I uncommented that line again, and it comes back.

0 Kudos
Message 15 of 18
(1,530 Views)
Solution
Accepted by ngay528

Ok - so, here's how to get around the issue.  There's a bit of an incompatibility between LabWindows/CVI 2009 and VISA 5.0.3.  Upgrading to LabWindows/CVI 2009 SP1 should resolve the issue for you (if that's an option). 

 

If it's not an option, you can fix the crash by moving the lines:

 

#if defined(_CVI_DEBUG_)
#pragma soft_reference (viGetAttribute);
#endif

 

to somewhere *after* viGetAttribute has been declared.  In the VISA.h for VISA 5.0.3, this would be somewhere after line 109.

 

We've filed a bug report to resolve this incompatibility with CVI 2009 and later versions of VISA (ID 239696)

 

I'm sorry for any inconvenience -

 

NickB

National Instruments

Message 16 of 18
(1,513 Views)

Moving the 'if debug' section down below teh initialization of Get attribute seemed to fix it.

 

I may be also to install the SP1 as well.  Is CVI 9.1.0 the SP1 (if so, then I already have that installed)? or is that just the updated 2009?

0 Kudos
Message 17 of 18
(1,510 Views)

CVI 2009 is version 9.1.0.

CVI 2009 SP1 is version 9.1.1.

 

There were a number of bugs fixed in the service pack, if you're able, I'd recommend upgrading to it.

 

NickB

National Instruments

0 Kudos
Message 18 of 18
(1,506 Views)