By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,886 Members | 1,123 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,886 IT Pros & Developers. It's quick & easy.

module definition file

P: n/a
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
Nov 2 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"George" <Ge****@discussions.microsoft.comwrote in message
news:98**********************************@microsof t.com...
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
Nov 4 '07 #2

P: n/a
Thanks for your clarification, Will!
regards,
George

"William DePalo [MVP VC++]" wrote:
"George" <Ge****@discussions.microsoft.comwrote in message
news:98**********************************@microsof t.com...
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
Nov 5 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.