I've made my own Static Library project on Visual Studio.
The problem is this: unless I personally test the code in another separately created project, I'm not able to catch errors.
An example?
In my library I added a class that includes the iostream header file.
Somewhere in the class, I used COUT and ENDL... but I forgot to write using namespace std;
Well, the compiler didn't complain.
I used my Class in a separate project (simulating the project of a programmer that installs my library on his computer).
Well, since in my 'test project' I wrote the using namespace std;,
the program runs.
The problem is, when I erase that using directive, well at that point I get an error from the compiler.
This because I'm including the header of my library in my project, so the compiler gets all the code as if it was just one translation unit.
I want my compiler to be able to catch and warn me of those errors in my LIBRARY project.
If I forgot the using directive in my LIBRARY project, I want the compiler to warn me there!
If your static library is made of header files, it isn't a static library. It's a handful of header files, and errors in those header files will only be found when they are compiled as part of something that uses them, just like any header file.
Depending on how the user of your library uses your header files, you may or may not get your wish. The user can have the library headers treated specially by the compiler, suppressing warnings, but it's their choice.
The compiler is silent if it never sees the code. So make it compile the code, and then it will see the code and then it will not be silent. For example, create a single main function that uses the template library functions so that they have to be created so the compiler has to look at them.