Jeffrey
Jeffrey

Reputation: 4506

How to generate lib for a Visual C++ dll project

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?

Upvotes: 0

Views: 992

Answers (2)

harper
harper

Reputation: 13690

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.

Upvotes: 3

Xearinox
Xearinox

Reputation: 3234

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

Upvotes: 2

Related Questions