Creating Dll’s import library(.lib) from a .def file in MSVC

Have you faced a situation where it is needed to create an import library (.lib file) from a (.def ) file  while using any third party DLL?

File-dll-icon

here is the way to do it.

Visual studio has a tool for it.
1) run Visual Studio2010->Visual Studio Tools->Command Prompt from  Start menu
2) run lib.exe with the ” /def:[def_file_name.def]”  option to generate the .lib file

One thought on “Creating Dll’s import library(.lib) from a .def file in MSVC

  1. Pingback: Creating import library from from DLL. | CPP Code Tips

Leave a comment