title: Dll export symbol of function from static linked library
body: <p>I am wrapping a static library in Dll to hide a lot of the implementation stuff since only 4-5 functions are needed and to avoid providing all third-party libraries and many header files. I seem to be having an issue with exporting a function to the dll from the static lib.
  The static lib has settings classes / structs similar to the one below</p>
  
  <pre><code>struct FooSettings
  {
     bool Read(const std::string&amp; file); // implemented in .cpp
     bool Write(const std::string&amp; file); // implemented in .cpp
     // rest members, just plain types
  };
  </code></pre>
  
  <p>In the Dll side</p>
  
  <pre><code>#include "FooSettings.h"
  
  #if defined(WIN32) || defined(_WIN32)
      #if defined(LIB_EXPORT)
          // DLL Build, exporting symbols
          #define LIB_API __declspec(dllexport)
      #elif LIB_IMPORT
          // DLL use, importing symbols
          #define LIB_API __declspec(dllimport)
      #endif
  #endif
  
  #ifndef LIB_API
      #define LIB_API
  #endif
  
  class LIB_API LibSDK
  {
  public:
      LibSDK();
      ~LibSDK();
  
      FooSettings get() const noexcept;
      void set(const FooSettings&amp; settings) const noexcept;
  
      void dummy() 
      {
          foo.Read("");
      }
  
  private:
      // etc...
  };
  </code></pre>
  
  <p>I can call <code>dummy()</code> on the "client" side without any issues
  but the code below leads to unresolved symbols </p>
  
  <pre><code>FooSettings foo;
  foo.Read("");
  </code></pre>
  
  <p>I would have expected that the FooSettings:Read is at least exported since it is part of a dummy function. Am I missing something ? My preference is to export it without the dummy function but I dont seem to be able to make it work either way.</p>