LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating object code to remove the run time engine dependency

Hi,

 

I have 2 questions:

 

1. I want to know whether there is a method to somehow generate an object code from CVI rather than a byte code? Let us consider a simple code having the addition of 2 numbers for this question.

As far as I understand, when we generate a dll out of a CVI code, a byte code is generated which goes to the CVI Run Time Engine in the target machine and it is the CVI Run Time Engine which interprets the byte code and generates a machine level object code. 

I have seen multiple links and all of them say that to run my dll, I need to have the CVI Run Time Engine installed on the target machine. My question is, whether we can remove the dependency of the CVI Run Time Engine by directly generating an object code from CVI which can run on any target system by a call from an ADE like MS Visual Studio, etc without having the CVI Run Time Engine Installed?

There are options to change the compiler in CVI to GCC or any other external compiler. Can changing the compiler option to GCC generate an object code or will the dll generated still require a Run Time Engine?

 

2. The second question is an extension of the 1st one. What happens when an NI Instrument Driver Library (For. e.g NI VISA) is used? If the answer to the 1st question is yes, it is possible to generate an executable code which can run on a target system without any dependency for the CVI Run Time Engine, will this be valid for a code which is using an NI Driver?

 

Any help will be appreciated !

0 Kudos
Message 1 of 3
(3,452 Views)

Hi,

 

Please help me with the above 2 questions.

 

 

0 Kudos
Message 2 of 3
(3,343 Views)

Hey @rcs, 

 

 Although I do not have in depth knowledge on this matter, I can try answering your question based on what I know of Labwindows CVI and my research on the web. Yes, you can generate object files (.obj) from LabWindows/CVI. You need to go to Options -> Create Object File to be able to do this. As with the definition of any object file, this will contain the binary data and the machine code which can be linked by an external compiler. Please keep in mind that National Instruments supports Borland, native LabWIndows and MSVC compilers (this is mentioned in the CVI programmers manual which I have linked in the next paragraph). You will have to select them appropriately in the build options. 

 

Moving further, when you are linking the object files in the external compiler, it will try to resolve all links. If there is something here that it does not find in its libraries, and happens to be something specifically from the LabWindows /CVI environment, it will rely on the run-time engine to fetch this. This concept is explained well in the CVI Programmers reference manual on page 3-12 (http://www.ni.com/pdf/manuals/323643a.pdf). 

 

Due to the above logic, the answer to point 2 would be - No, you cannot have this object file containing symbols of NI-VISA drivers run without the LabWindows/CVI run-time enginne. The run-time engine is a free to download software which will install the right DLLs and dependencies on the computer. 

Is there any particular reason or use case, due to which you are trying to avoid installation of the Run-Time Engine ?

 

Again, as I said, I do not have extensive experience with text based programming, so feel free to correct me. Let`s hope we can get a clear understanding of the matter through this discussion !

 

Regards

Suraj Pawar

AE, NI India

Message 3 of 3
(3,314 Views)