I use MinGW32 + Eclipse CDT ... I am faced with the problem that when using templates, which I use extensively, it is impossible to create libraries (both static and dynamic). As a result, your library of template classes has to be included in the next project in the form of source codes. The result is a lot of compilation and size of compiled code.

Advise ... what to do. Maybe I do not know something ...

Sincerely, Alexander Bychkov

    1 answer 1

    Generally exporting templates exists. Proof Another question is that in C ++ this is not done normally, i.e. The most workable way to distribute a library with templates is to distribute it in source codes. Well, and most likely, therefore, the committee on language removed this dubious possibility from the standard. [2]