Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Visual Studio generate these additional files?

In the output directory where Visual Studio places the compiled executable, there are three additional files of the types *.exp, *.lib, .pdb. I do not need those files and I would like to prevent the compiler from creating them.

This is how my build output directory looks like. I only need the *.exe file.

output directory with unwanted additional files

What are these additional files for? How can I disable that they are generated? If they are needed for the build process, is there a way to automatically remove them after the executable is created?

I am using Visual Studio 2012. If you need additional details, please comment.

like image 539
danijar Avatar asked Apr 03 '13 20:04

danijar


2 Answers

EXP and LIB files But I don't want that .lib or .exp file for my COM library! . You could probably set the location of these files in the "Intermediate Output" setting and not have them in your release folder

like image 90
Jeff Paquette Avatar answered Oct 20 '22 01:10

Jeff Paquette


I'm assuming you are looking to have only the dll and exe files in your final release directory and the *.exp, *.lib, .pdb files left in your intermediate directory as to not clutter the directory you are working in.

Visual Studio 2017

Open properties (Right click on the project in the solution explorer): change settings as shown:

Import Library will define where the .lib and .exp files are created. enter image description here

Generate Program Database File defines where the .pdb file is created. enter image description here

Debug information format -- None will prevent pdb file from being created. Select this option for Release builds. enter image description here

like image 20
tzg Avatar answered Oct 20 '22 00:10

tzg