title: How to export multiple header files as a single header file in C++?
body: <p>I'm developing a DLL using Visual Studio. Currently, I have one header file: <code>MyProject.h</code>:</p>
  
  <pre><code>#pragma once
  
  #ifdef MYLIBRARY_EXPORTS
  #define MYLIBRARY_API __declspec(dllexport)
  #else
  #define MYLIBRARY_API __declspec(dllimport)
  #endif
  
  #include &lt;map&gt;
  #include &lt;string&gt;
  
  extern "C" class MYLIBRARY_API Class1
  {
      // some stuff here...
  };
  
  extern "C" class MYLIBRARY_API Class2
  {
      // some stuff here
  };
  </code></pre>
  
  <p>I am going to be adding some more classes to the project and I would like to add separate header files for each class (please advise if I should not do that). However, eventually, I want to package all that into a single .dll and .lib in such a way that the client only needs to include a single header file. That is, the client project has <code>#include "MyProject.h"</code> which is essentially a collection of header files with their implmentation files. Is this possible and how can I achieve this? Thanks.</p>
  
  <p>EDIT:</p>
  
  <p>To be specific, what I want to do is to put <code>Class1</code> in <code>Class1.h</code> and <code>Class2</code> in <code>Class2.h</code> and include both of them in one master header file called <code>MyLibrary.h</code> so that a client only have to do <code>#include "MyLibrary.h"</code>. </p>