Take the 2-minute tour ×

I have a Visual C++ dll project. The dll can be created, but the lib isn't generated. Which project propery should I modify to ouput the lib?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

Use a Module Defintion File:

  • Add a DEF file to your DLL project, if it does not already have one.
  • Verify that the DEF file is used as "Module Definition File".
  • Add all symbols to be exported to the DEF file.

Alternatively you can use __declspec(dllexport) to define exported symbols.

share|improve this answer

Do you export some symbol? Without exporting something, lib is not generated.

share|improve this answer
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. –  user35443 Nov 17 at 7:03
@user35443: For your comment, do you have clarification why this is not answer? –  Xearinox Nov 17 at 13:57
When will people finally realise that these comments are put under the post when somebody recommends a deletion. Just to show you what reviewers think of your answer: prntscr.com/57ab9v . 6/8 do recommend deletion. –  user35443 Nov 17 at 14:22
@user35443: Two up votes speak for me. –  Xearinox Nov 17 at 14:29
I just wonder why is there so many closed or deleted answers with upvotes out there. Hmm, let me think... maybe because they're actually wrong, even though some people think they're good? Reviewers are those who decide whether answer should be deleted or not - not people with vote privileges (even monkey can get 15 rep). –  user35443 Nov 17 at 15:47

Your Answer


