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: 

"Warning: DLL has no exports. No import library created. "

Hi everyone,

 

I am really need help for this one, I try so many way and spend a lot of time but no help.

I want to create an .dll file. But I keep getting message "Warning: DLL has no exports. No import library created. " . I use the dependencywalker to check the dll, and there is no function inside, so I could not use that dll.

To create that dll file, I first have to create a lib file and then create the dll. I already export the function prototypes to a header file, add it to myproject and add it to the target setting. 

I also attach my project here, so you can see when I was wrong.

 

Thank you very much.

0 Kudos
Message 1 of 4
(6,835 Views)

Hello,

 

1) You must remove the maingold.lib from your project (the *.lib is generated by CVI, you don't have to include it in your project):

removeLib.PNG

 

2) You must include maingold.c in the build.

 

includeFile.PNG

 

3) you must select the include file to export in the target setting:

 

TargetSetting.PNG

 

4) You have to add all the source code files in your project:

 

AddFile.PNG

 

SourceFiles.PNG

 

5) You remove #include "mex.h"  from maingold.c  

 

Here you can compile and you will have a Dll generated.

 

DepWalker.PNG

 

 

I hope it will help you...to start

 

Best regards.

 

 

Message 2 of 4
(6,806 Views)

Awesome, thank you so much. You really save me here

0 Kudos
Message 3 of 4
(6,769 Views)

thank you so much. You really save me here

0 Kudos
Message 4 of 4
(1,329 Views)