module definition file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello everyone,


I am using Visual Studio 2005 to develop C++ DLL (in-process COM). There is
a setting in Linker --> Input called Module definition file. This setting
makes me confused,

1. I have tried that if input a file name (.def), then the generated DLL be
larger than the time when we leave the module definition file to empty.
Should we leave it empty or non-empty (input a .def file name);

2. What is the function of the module definition file? Should developer
write it manually or generated by system.


thanks in advance,
George
 
George said:
1. I have tried that if input a file name (.def), then the generated DLL
be
larger than the time when we leave the module definition file to empty.
Should we leave it empty or non-empty (input a .def file name);

I know of only two ways to export a function by name from a DLL. Either tag
it with the __declspec(dllexport) attribute or specify it's name in the
module definition file. Pick one.
2. What is the function of the module definition file? Should developer
write it manually or generated by system.

See above. It's usually the proper choice when you want no name decoration
of the exported symbol.

Regards,
Will
 
Back
Top