MrDoomMaster
March 25th, 2008, 05:29 PM
Hi,
I'm just curious if it is safe to use STL in the implementation and interface of a library which is compiled into a shared library (DLL). I remember years ago trying this and it never worked because I was at some point required to also export STL container classes.
Since STL container classes are pure template classes, it wouldn't make sense to have to export them since templates cannot be generated at runtime. I am also unsure if the C++03 standard states that statics may not be used in the implementation of STL. If statics can be used, for example, by std::vector, you could run into memory management issues if I am not mistaken.
Clarification on this matter would be greatly appreciated!
I'm just curious if it is safe to use STL in the implementation and interface of a library which is compiled into a shared library (DLL). I remember years ago trying this and it never worked because I was at some point required to also export STL container classes.
Since STL container classes are pure template classes, it wouldn't make sense to have to export them since templates cannot be generated at runtime. I am also unsure if the C++03 standard states that statics may not be used in the implementation of STL. If statics can be used, for example, by std::vector, you could run into memory management issues if I am not mistaken.
Clarification on this matter would be greatly appreciated!