From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

input file not a valid archive

Solved!
Go to solution

Hi

Originally the application was written in CVI 6.0. I have now created a completly new project and workspace and added all the files.

The compilation works fine. But the error message I get when linking (build) is " error: Input file is not a valid archive: 'c:\Projects\........\bin\i7000.lib'. "

With another library I get the same problem: "uart.lib"

The other lib-files just work fine.

I saw in an old post a solution: to just recreate the project which I did. But it didn't work in my case.

Any help? 

 

Cheers Andreas

0 Kudos
Message 1 of 11
(8,979 Views)

Hi Andreas,

 

which version of CVI are you using now? Did you try rebuilding the library?

 

Regards,

Maha

0 Kudos
Message 2 of 11
(8,958 Views)

Hi Maha

 

We use CVI 2013 on Windows 7. The problem is that the LIB/DLL which causes that problem (i7000.lib) is from a hardware manufacturer (RS-232, RS-485) who doesn't support that specific API anymore. So we have to live with those old versions or build a complete new hardware/software solution which we try to avoid so far.

 

But what does the message  mean exactly? Is it maybe possible to change any compile/link switches? Or any other idea?

 

Best regards

Andreas

 

0 Kudos
Message 3 of 11
(8,951 Views)

Hi Andreas,

 

I did some research and it appears this error shows up when the library was created using an old standard format for .LIB files. The solution would then be rebuilding the .lib library using CVI 2013.

 

Before CVI 2013, an old compiler toolchain was used for CVI. Since the 2013 version a more updated and powerful toolchain is used. This one detects more warnings and errors, which weren’t detected in older versions.

 

The library you are using is created using an old standard format for .LIB files which won’t be accepted by new compiles unless you change it to new specifications.

 

Another solution, which is not that optimal, would be to an older version of CVI than 2013.

 

I hope this helps.

 

Best Regards,

Maha

0 Kudos
Message 4 of 11
(8,899 Views)

 Hi Maha

 

Thanks for your investigations.

 

The LIBs I use "i7000.lib" resp. "i7000.dll" and "uart.lib" resp. "uart.dll" have an age of about 10 years AND are from a vendor/manufacturer that doesn't support these LIBs anymore.

 

So first of all we don't have access to the original c code and therefore can't compile/build any new LIB. And most probably they were not made with CVI.

Then as a second thought: these LIB/DLLs follow the standard and conventions of a microsoft LIB/DLL. So this should be some standard interface, even for CVI.

Third, I think there are 1000s of such old (Microsoft standard) libraries still in use all over the industry. Therefore I cannot understand why CVI 2013 is not capabable of linking them to the rest of the code.

 

Maybe I miss something in my thoughts. Like you mention already an older CVI is not a solution for us. Do you see maybe the possibility of another workaround?

 

For your understanding I attach the 2 LIBs in a zip-file. Maybe it helps?

 

 

Anyway have a nice wekend.

Andreas

0 Kudos
Message 5 of 11
(8,866 Views)
Solution
Accepted by topic author RTM

Hi Andreas,

 

I've tried to build a simple project calling one function from each of the libraries you provided:

Get_Uart_Version();
FloatToHex(12.34);

The project was building successfully, there was no linker error. I've tried it both with CVI 2013 and CVI 2013 SP2.

Could you try and see if such a simple project still gives the same link error for you?

If not, it is possible that the problem is not only a library format issue. You would have to try and simplify the project until you find the portion of code that triggers the linker error. As an alternative, you could send us your project and we can try to isolate the problem.

 

Best regards,
Alpar

0 Kudos
Message 6 of 11
(8,740 Views)
Solution
Accepted by topic author RTM

Hi Andreas,

 

This linking issue you are seeing can usually be fixed by building a new .lib file. You don't need the source code to do so, just the associated .h header file. If you open the .h file that goes with your DLL in CVI, you can select Options > Generate DLL Import Library... to create a new .lib file that should work with the CVI 2013 linker to get rid of this error.

0 Kudos
Message 7 of 11
(8,700 Views)

Hi Kevin

 

Thanks for your answer.

 

I'm new to cvi 2013 so I think I made a mistake because I selected in the Target Settings (see attached image) under "Load external modul options" the 2 lib files. I think now that wasn't necessary at alle because the 2 files were already in the project. Without selecting them in Target setting the program compiled and linked fine. So I guess everything works fine now.

 

So sorry for my storm in the waterglass ,) and thanks again..

 

Andreas

0 Kudos
Message 8 of 11
(8,573 Views)

Hi Alpar

 

Thanls fpr your answer.

 

Pleas see my answer at kevins post.

 

Andreas

0 Kudos
Message 9 of 11
(8,570 Views)

Hi,

Thank you very much for your solution. It worked brilliantly well.

VonBeks

0 Kudos
Message 10 of 11
(7,369 Views)