title: No .lib file generated after building tiny C++ static library project
body: <p>I decided on adding a tiny extra project to my visual studio solution which includes only a single header file(for now) with a mutex which allows only 1 thread to output to the console at a time. Since this is a functionality which all of my projects in my solution will need so I thought it will be best to add a separate project for it and add references to it on the other projects.</p>
  <p>So I created an empty project named Commons, then added an header file logger_mutex.h and wrote the following code inside it.</p>
  <pre><code>#pragma once
  
  #ifdef _DEBUG
  #include &lt;mutex&gt;
  std::mutex loggerMutex;
  #endif
  </code></pre>
  <p>I changed the project type in properties from Application(.exe) to Static Library (.lib). Then I added the include path to this file in the other project properties. Also I added this Commons project as a reference to all my other projects. But now when I try to build the solution it gave the error LINK1104 cannot open file ../path/to/my/output/directory/Commons.lib</p>
  <p>I investigated on the output directory and there was no file in there named Commons.lib. I tried rebuilding the Commons project separately, and even though visual studio said it built successfully I did not see the Commons.lib file appear on the output directory.</p>
  <p>I tried it even without the other projects, in a completely different solution. It still did not generate any .lib file in the output directory. I think this should be verifiable as well.</p>
  <p>So what am I missing here, is there some kind of minimum requirement needed to have to get a .lib output file generated? Is my code too small to generate a .lib output? I am using Visual Studio 2022.</p>