Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

How to add dll library to application?

I start programmed the CVI a few weeks ago and I have a little problem. I must make an application layer for profibus master device. However I total do not know how to add dynamic library to program, because in another way I get the error: undefined symbol. I know that it very trivial, but I cannot find solution. I have a lib file and also I include file about device, but I still get the error – undefined symbol – can you help me?
Thanks very much for any advice or help
0 Kudos
Message 1 of 4
(11,548 Views)

Dear laszku,

Are you looking for solutions to connect your CVI application with PLC? Because there are also solutions for that which are easy to use, and to implement with CVI.

If you want to use your DLLs, there are some on-line help, how to import them in CVI.

Basicaly there are two different method to import DLLs:

- static import, when you import the library in your CVI project. The dll will be loaded when the exe starts running. If there is an issue to load the library, you'll be able to get the error at compilation time.

- dynamic dll import, when you load the library at run-time. With this, you get the flexibility to control, when will be the dll linked to your exe in the memory, while running. The disadvantage is, you'll get errors only at run-time.

 

I recommend you some of our on-line tutorial, how to load DLL into your application in CVI:

CVI Help: Loading Dlls - This says: You cannot import DLLs directly into your project. You need to create DLL Import Library, which can be imported into your project.

To do so, look at this knowledge base: Creating Import Libraries for a DLL in LabWindows/CVI

 

You might get answers for your following questions at this FAQ page:

FAQ: Using Dynamic Link Libraries with LabWindows/CVI

 

Some help sites:

Rules for Using DLL Files

Linking to Functions Defined in a DLL From LabWindows/CVI

 

If you need dynamic linkink, you can get example code with this site:
How Can I Access DLL Functions in a LabWindows/CVI Program Without Including the Import Library in t...

 

I hope, I could help you to find the way how to import DLL libraries.

If you still couldn't solve the error after studying the links, please provide me more information, where, which symbol is missing, and also the full error message.

The error you get, can be caused by the linker or pre-compiler also, which doesn't find the symbol you requested. Please check the path of your library and dll also.

 

Best Regards,

Tamas Szekely

Applications Engineer

National Instruments

 

0 Kudos
Message 2 of 4
(7,241 Views)

If your computer is missing a .dll file that it needs to perform a certain function, it will typically send you an alert message to let you know that you need the file before you can proceed.


0 Kudos
Message 3 of 4
(7,102 Views)

I think the question is in reference to programming, how to implement a dll file, not upload one to rectify a software issue.  

0 Kudos
Message 4 of 4
(6,538 Views)