LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

import shared library (dll) wizard

Hey,

 

I got a commdll and from the company that developed the instrument I’m working on.

They send me a project that includes the following:

1. lib32dll and lib32dlld which one should I use?

2. The project include a lot of header files, can I still use the wizard ?

3.  when I’m trying to use the import wizard I’m getting this:

 

"The shared library contains 338 function(s). The declarations of 41 function(s) are found and recognized in the header file and these function(s) can be wrapped. The remaining function(s) cannot be wrapped. If you want to import these functions, please review the warning messages next to the functions below. You will need to fix the problems before you can continue with the wizard."

 

when standing on one of the faild functions:

 

"The following header file was not found in the specified header file or one of the referenced header files:

-  afx.h

-  string

-  cstring

-  cstdio

-  sstream

-  list

-  map

 "

Hope to get supported,

Dani Kurtz

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

Hello DaniK,

 

1.  Usually a .dll is what the Import Shared Library wraps up for use in LabVIEW.

 

2.  The header files are necessary.  They help expose and describe the functions in a .dll for use by LabVIEW.  If we don't have a header file to define the functions inside of a .dll, we don't know what the functions inside of it expect for arguments, or what kind of data we can expect them to return.

 

3.  The message "The shared library contains 338 function(s). The declarations of 41 function(s) are found and recognized in the header file and these function(s) can be wrapped. The remaining function(s) cannot be wrapped. If you want to import these functions, please review the warning messages next to the functions below. You will need to fix the problems before you can continue with the wizard" you're seeing here is just the Import Shared Library letting you know which functions were clearly described in the header file.  Of the 338 functions it perceives in the .dll, only 41 are clearly defined.  

If the vendor intended the end user to make use of only 41 functions, this is not a problem.

 

"The following header file was not found in the specified header file or one of the referenced header files:..."
Is a little more problematic - but it should be solveable by including the path of the location of the Vendor's header files in the "Include Paths" step of the Import Shared Library wizard.

 

Two additional resources that you may find helpful:
Tutorial: Creating Wrapper VIs for C/C++ DLL functions using the Import Shared Library Wizard

Calling C/C++ DLLs Containing Simple and Complex Datatypes from LabVIEW

 

Best regards,

Matthew H.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,671 Views)
What's a bit confusing is your mention of a commdll. Is it comm as communications or COM as in Component Object Model (ActiveX). With an ActiveX dll, you don't use the wizard at all.
0 Kudos
Message 3 of 3
(3,665 Views)