Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does *.exp file do? [duplicate]

Tags:

Possible Duplicate:
what is use of .exp and what is the difference between .lib and .dll

when I link with some c++ library, for each *.lib, it is associated with a *.exp file. what does *.exp do?

***.lib / ***.exp 
like image 726
Adam Lee Avatar asked Dec 02 '12 07:12

Adam Lee


People also ask

What is an .exp file?

An EXP file is a symbols export file, produced by an integrated development environment (IDE) or compiler. It contains binary information about exported data and functions. EXP files are used to link the program they were created from with another program.

What is .EXP file in Linux?

exp) files contain information about exported functions and data items. When LIB creates an import library, it also creates an . exp file. You use the . exp file when you link a program that both exports to and imports from another program, either directly or indirectly.

How do I read an .exp file?

When you click on a link that points to an EXP document file (. WXP extension) your browser should automatically download the EXP file and then launch the EXP Viewer to view it. Note that the EXP document will not appear inside the browser's window; it will be displayed in a separate EXP window.

What is .EXP file Visual Studio?

exp extension primarily stands for the Symbols Export File (. exp) file type used in Microsoft Windows programming, namely within Microsoft Visual Studio, a powerful commercial IDE by Microsoft. The purpose of a symbols export file (. exp) is to provide reference to library functions, 'exporting' them for the linker.


1 Answers

Export (.exp) files contain information about exported functions and data items. When LIB creates an import library, it also creates an .exp file. You use the .exp file when you link a program that both exports to and imports from another program, either directly or indirectly. If you link with an .exp file, LINK does not produce an import library, because it assumes that LIB already created one.

From MSDN

You can use LIB with the /DEF option to create an import library and an export file. LINK uses the export file to build a program that contains exports (usually a dynamic-link library (DLL)), and it uses the import library to resolve references to those exports in other programs.

Note that if you create your import library in a preliminary step, before creating your .dll, you must pass the same set of object files when building the .dll, as you passed when building the import library.

In most situations, you do not need to use LIB to create your import library. When you link a program (either an executable file or a DLL) that contains exports, LINK automatically creates an import library that describes the exports. Later, when you link a program that references those exports, you specify the import library.

However, when a DLL exports to a program that it also imports from, whether directly or indirectly, you must use LIB to create one of the import libraries. When LIB creates an import library, it also creates an export file. You must use the export file when linking one of the DLLs.

From MSDN

like image 165
NullPoiиteя Avatar answered Oct 19 '22 07:10

NullPoiиteя