LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

"CVIANSI Invalid type specification" error

Hello,

I am trying to recompile a LabWindows project that was developped a few years ago, but I am getting the following error:
 
ERROR: "CVIANSI Invalid type specification"
 
The error points to a line in the stdlibex.h file.  My project used to compile and run perfectly before.  I think the system configuration may have changed.  I can't figure out why I'm getting this error.  Can someone please help me out?  What am I missing?

Thank you,
Gohar
0 Kudos
Message 1 of 12
(4,545 Views)

Hi Gohar,

When did the program stop working? Did it stop working immediately after you changed your system configuration? When you say that your system configuration might have changed, do you mean you have changed versions of CVI? If so, what version of CVI are you currently using to open the project and what version of CVI was the project developed in?

Also, what line in the stdlibex.h file does the error point to?

The answers to these questions should help point us in the right direction.

Regards,

Matt
NI

0 Kudos
Message 2 of 12
(4,517 Views)
Matt,
 
By changing the configuration, I mean that the project (and the installation of CVI) were moved from one PC to another.  This was done some time ago, so I don't know if the person who moved the CVI software performed the installation correctly.  I am in the process of trying to track down the version of CVI that was originally installed, so I can do a fresh re-install.   I don't know at this point if that will help.

I am getting the error on line 27 of the stdlibex.h file.  Here's the content of that line:
 
unsigned __int64 CVIANSI strtoul64(char**, int)
 
The error complains about the CVIANSI type.  It says "Invalid type specification".
 
Gohar
0 Kudos
Message 3 of 12
(4,511 Views)

Hi Gohar,

If you are unable to track down the version of CVI or if you reinstall and it still does not work I would try three steps:

1) Create a new project and include stdlibex.h. If this works then I would move to skip step 2.
2) Check your Environment settings under Options >> Environment. Then click the Include Paths button. If you have any extra paths listed, verify that stdlibex.h does not exist in multiple folders. If it does, this could be causing a problem.
3) Create a new project and copy all of your code into the new project. It is possible that your project somehow was corrupted in the transition/upgrade.

Let me know how this goes for you.

Regards,

Matt M.
NI

Message 4 of 12
(4,504 Views)
Thank you Matt,
I will try these steps and let you know how it turns out.

Goharikk
0 Kudos
Message 5 of 12
(4,496 Views)
Make sure that you have cvirte.h included. That should fix it. CVIANSI is defined as __cdecl

Bilal Durrani
NI
0 Kudos
Message 6 of 12
(4,479 Views)
Thanks for the suggestion.  Both cvirte.h and cvidef.h are included in the stdlibex.h file, and are both present in the include directory, so that does not seem to be the problem.
0 Kudos
Message 7 of 12
(4,456 Views)

Hello Matt,

I still haven't re-instaled CVI (there were some unforseen complications with that), but I did try your suggestions.  Step (1) worked perfectly fine.  Labwindows didn't seem to have a problem with stdlibex.h in my new project.  And I checked the include paths (step 2) - no extra paths are listed anywhere in the options/environment panel.

However, when I got to step 3, things stopped working again.  I did create a new project and copied all my code over, but I still get the same errors.  So a corrupted project is definitely not the problem. 

I wen one step further and commented out the line in stdlibex.h that was giving me a problem.  The error messages went away, but this is not a good solution.  Plus, now I have some new errors (a long list of undefined symbols), so I am even more confused as to what the problem is.  I suspect some of the device driver files (.fp files) are not as they should be.  But I don't know enough about LabWindows or the drivers themselves to figure out what exactly is wrong.  I guess more investigation is neede.

Anyway, thank you all for your help.

Any new insignht in this matter would be greatly appreciated.

 

Gohar

0 Kudos
Message 8 of 12
(4,453 Views)
By the way, there's one small detail I forgot to mention:
 
The reason the "CVIANSI Invalid type specification" error message went away when I commented out that one line in stdlibex.h is because apparently none of the functions defined in the stdlibex.h file are used in any of my code.  I wasn't aware of this before. 

But if none of these functions are used, then why am I getting an error message?  This is the mystery.
 
-Gohar
 
0 Kudos
Message 9 of 12
(4,452 Views)
Make sure that that define is not getting undefined by something else. You can check what the CVI preprocessor see if you open the C file and go to Options >> Preprocess source file. This should give you an idea of whats missing or different.



Bilal Durrani
NI
0 Kudos
Message 10 of 12
(4,434 Views)