LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I resolve Project Link Error - Inconsistent type declarations for external symbol in nidobj files

Solved!
Go to solution

After including an implicit call to a dll I created in LabVIEW, I get the following Project Link Error, Inconsistent type declarations for external symbol '_TheActiveMeasurementPath' in modules 'c:\Home\EChamberSystem\cvibuild.ECALsystem\EGunControlHandler.nidobj' and 'c:\Home\EChamberSystem\cvibuild.ECALsystem\AlarmsAndWarnings.nidobj'.

 

What does this mean?

0 Kudos
Message 1 of 11
(7,202 Views)

I would have to see your LabVIEW code to know why you get the message.  So I'm guessing that the way the function (VI - dll) is defined may be different that how you deined it in CVI (calling convention, parameter type, number of parameters/arguments).  Compare them to see if everything is defined the same way.

 

R

0 Kudos
Message 2 of 11
(7,195 Views)
Solution
Accepted by topic author Siexto
After checking your function prototypes as Ray suggests, I would just delete the cvibuild directory (under your project directory) which is where all the niobj files are, and rebuild your project.  There are some rare combination of events where the CVI compiler/linker doesn't know it needs to rebuild.  If you delete the cvibuild directory, it will force you to completely rebuild.
Message 3 of 11
(7,184 Views)
Thanks to Ray.R and AI S.  Deleted and rebuilt as suggested and is now working. 
0 Kudos
Message 4 of 11
(7,174 Views)

Hi all,

I am unable to compile my CVI code in cvi 2009. The attached file shows the error. Please help me compiling the code. And I am trying to compile in debug mode this error throwed up  but if I compile in release mode it does not.

 

Thanks,

VJK

0 Kudos
Message 5 of 11
(6,243 Views)

Have you tried deleting the cvibuild directory and then rebuilding?

0 Kudos
Message 6 of 11
(6,236 Views)

Yes I tried deleting the buid folder and then compiling. But still the link error persist. How can I debug the code?

0 Kudos
Message 7 of 11
(6,226 Views)

Do you recognize the name of the function in the error message?

Is it defined in a .c file in your project or in an external .DLL?

 

Search for it through all .h and .c filers in your project.  I'd start the search by looking for LineFile_ReadNonEmpty.  Don't include the leading _, or the trailing @20.  Don't search for Full Words Only.  See if it shows up in more than one .h file or if the prototype is in a .h file and a .c file.

 

If it's in a DLL, are you linking it statically (including the .lib file in your project) or dynamically (calling LoadLibrary in your code)?

See the NI article here: http://www.ni.com/white-paper/8503/en/

If you're linking statically, make sure that your .h file matches the .lib file.

 

 

0 Kudos
Message 8 of 11
(6,199 Views)

Al_S,

As you said I searched for LineFile_ReadNonEmpty in my project and it is declared in two files - .h and .c. So should I remove the declaration in one of the file and try ?. or Please suggest the best possible method to sort out the linking error.

Currently I dont have the pc which caused problem. Its a cleint PC.

 

Thanks. 

0 Kudos
Message 9 of 11
(6,171 Views)

Yes, your function prototype should be defined only in one place.  Depending on your coding standards, some people like to have all function prototypes in .h files, other people have the prototype in the file in which you are calling the function if you are only calling it from one file.  If you are calling the function from multiple files, it's usually better to have the prototype in a .h file and then #include that .h file in any .c file that calls the function.

0 Kudos
Message 10 of 11
(6,155 Views)