Reputation: 111
I have project that outputs a dll. Currently I have specified only a few functions to be exported. After compilation a dll file is generated and also a .lib file with the few exports that I had. I want to know if there is an easy way so that I can export all the classes to lib file. I cannot possibly add all statements for each class to .def file also I dont want to edit the code to change declaration of each method. Is there a visual studio setting that can tell the compiler to export all code.
Upvotes: 0
Views: 457
Reputation: 941455
Use __declspec(dllexport) on the class declaration instead of using a .def file. Exporting everything doesn't make a lot of sense and is not supported. You pick what should be visible.
Upvotes: 1