We must define dllexport when doing the explicit template instantiation definition.
We must define dllimport when doing the explicit template instantiation declaration.
I have added @LIBRARY_NAME@_EXPLICIT_INSTANTIATION_DECLARATION_DLLEXPORT and @LIBRARY_NAME@_EXPLICIT_INSTANTIATION_DEFINITION_DLLEXPORT to do the job.
After testing, the first approach is not working.
We must define dllexport when doing the explicit template instantiation definition. We must define dllimport when doing the explicit template instantiation declaration.
I have added
@LIBRARY_NAME@_EXPLICIT_INSTANTIATION_DECLARATION_DLLEXPORT
and@LIBRARY_NAME@_EXPLICIT_INSTANTIATION_DEFINITION_DLLEXPORT
to do the job.Look like another developer had the same conclusion : https://www.reddit.com/r/cpp_questions/comments/111t3zt/comment/j8gwgmp/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button