LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Help creating DLL of a file in a project in LabWindows ?

Hi

I am a new user of LabWindows. I have a bunch of files in a workspace. I want to create a dll for a particular *.c file which has a *.h file. I am not sure how to do this. This is simple in LabVIEW but looks confusing in LabWINDOWS. Could some one help me ?

Thanks.

Kudos are the best way to say thanks 🙂
0 Kudos
Message 1 of 2
(3,141 Views)

Maximus,

If you have only one .c file in the workspace among many that you wish to create a .DLL for then you should make a separate project for it.  To do this go to the File->New menu and select 'Project (.prj)'.  At the New Project Options prompt, select 'Create Project In Current Workspace' this should be the default, and click OK.    Now in your file menu bar on the left, you can simply click and drag the .c file you want to compile as a .DLL to your new project.

In order to build the desired project into a .DLL, right click on the name of the project in the file menu bar and select 'Set As Active Project' (If this option is greyed out it means that it is already the active project).  Next, go to the Build->Target Type menu bar and select the target type to be 'Dynamic Link Library'.  This will tell CVI you want to make the .c file into a .DLL instead of a .exe file. 

Once you have set the TargetType to 'Dynamic Link Library' you can press 'Ctrl+M' to build the file.  Labwindows will create a .lib, and .dll file for you.  If you are creating a debuggable .DLL it will also create a .cbd file.

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