07-06-2005 12:43 PM
07-06-2005 12:52 PM
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.