Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatically generate a DLL .DEF file in Visual Studio?

Is there any way to automatically generate the DEF file for a DLL in Visual Studio? I've always just manually created them before, but there's gotta be an easier way.

like image 614
Adam Haile Avatar asked Feb 01 '10 16:02

Adam Haile


People also ask

How do I create a DLL code in Visual Studio?

To create a DLL project in Visual Studio 2019On the menu bar, choose File > New > Project to open the Create a New Project dialog box. At the top of the dialog, set Language to C++, set Platform to Windows, and set Project type to Library.

How do I save a .DEF file?

Right-click the selected objects, and select Export Selected Objects. In the Save As dialog box, navigate to the appropriate folder, and click Save. The . def file of the selected objects is exported to the specified location.

What is .DEF file in C++?

A module-definition or DEF file (*. def) is a text file containing one or more module statements that describe various attributes of a DLL. If you are not using the __declspec(dllexport) keyword to export the DLL's functions, the DLL requires a DEF file.


1 Answers

I have found a place to generate the .DEF file for you here: expdef - def file generator

This works amazing and has a list of options you could also generate besides the method names of the functions and symbols.

like image 151
user2577497 Avatar answered Sep 25 '22 06:09

user2577497