title: Issues with Multiple Declarations gcc
body: <p>I am attempting to use Nanovg in my OpenGL project and am getting repeated multiple definition errors such as</p>
  
  <blockquote>
    <p>CMakeFiles\Game.dir/objects.a(Game.cpp.obj):Game.cpp:(.text+0x2e91): multiple definition of `nvgCreateGL3'<br>
    CMakeFiles\Game.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x2e91): first defined here</p>
  </blockquote>
  
  <h2>Game.h</h2>
  
  <pre><code>  class Game {
  
      public:
        void Run();
        Game(std::string Title, ScreenMode ScreenMode, int Width, int MSAASamples, bool VSync);
      private:
        GLFWwindow* Window;
        NVGcontext* VGContext;
        std::string Title;
        ScreenMode Mode;
        int Width, Height;
        int WWidth, WHeight;
        int FBWidth, FBHeight;
        int MSAASamples;
        bool VSync;
        bool Exit;
        float PixRatio;
        void Process();
        void Render();
        void KeyCallback(GLFWwindow* Window, int Key, int Scancode, int Action, int Mode);
        void SaveScreenShot(const std::string* Path);
  
    };
  </code></pre>
  
  <h1>Game.cpp</h1>
  
  <pre><code>//various #includes .. (STL GlaD, GLFW)
  
  #ifndef NANOVG_INCLUDED
  #define NANOVG_INCLUDED
  #include &lt;nanovg.h&gt;
  #define NANOVG_GL3_IMPLEMENTATION
  #include &lt;nanovg_gl.h&gt;
  #endif
  
  // More #includes ...
  #include &lt;Game.h&gt;
  
  
  Game::Game(std::string Title, ScreenMode ScreenMode, int Width, int MSAASamples, bool VSync)
  {
    // constructor here
  }
  
  void Game::Run(){
    // Initialise openGl and NanoVG, then into main game loop calling `Render();`
  }
  </code></pre>
  
  <h1>Render.cpp</h1>
  
  <pre><code>//various #includes .. (STL GlaD, GLFW)
  
  #ifndef NANOVG_INCLUDED
  #define NANOVG_INCLUDED
  #include &lt;nanovg.h&gt;
  #define NANOVG_GL3_IMPLEMENTATION
  #include &lt;nanovg_gl.h&gt;
  #endif
  
  // More #includes ...
  #include &lt;Game.h&gt;
  
  void Game::Render() {
    //Definition using Nanovg
  }
  </code></pre>
  
  <p>Here are some other things that may be useful
  <a href="http://puu.sh/o0NrU/9b11e6d904.txt" rel="nofollow">CMakeLists Available Here</a><br>
  <a href="http://puu.sh/o0NvK/8af8f75742.txt" rel="nofollow">Full Console output Available Here</a></p>
  
  <h1>What I have tried</h1>
  
  <ul>
  <li>Putting the line <code>#define NANOVG_GL3_IMPLEMENTATION</code> in Game.h</li>
  <li>Putting the Nanovg includes AND the <code>#define ...</code> in Game.h</li>
  <li>tried changing the location WHERE Game.h and the nanovg libs are placed with <code>#includes ...</code> (causes unknown type errors)</li>
  </ul>
  
  <p>Many thanks in advance for the help with this issue</p>