Re: member function level dll export

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I have a class with only static functions in it (the Factory class I
mentioned above).
I export each of these functions with __declspec(dllexport).

IMHO: Yuck!

Why deal with name mangling that takes place for member functions when you
don't have to? You can either dllexport an extern "C" forwarder function,
or use the linker .def file to assign a permanent name to these static
functions, then your names won't be compiler-version dependent.


.