title: LNK2001: unresolved external symbol public: static class std::vector
body: <p>I'm trying to something very simple and can't figure out why I'm getting this error:</p>
  
  <pre><code>mainwindow.obj:-1: error: LNK2001: unresolved external symbol "public: static class std::vector&lt;class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt;,class std::allocator&lt;class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; &gt; &gt; const MazeBuilder::algorithms" (?algorithms@MazeBuilder@@2V?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@B)
  </code></pre>
  
  <p>I want to have a vector of strings that I access with my enums so I have a nice way to write out what I'm grabbing, and all my other classes can use it.</p>
  
  <p>Here is a shortened version of my code:</p>
  
  <p>MainWindow.cpp</p>
  
  <pre><code>#include "MainWindow.h"
  #include "MazeBuilder.h"
  #include "ui_mainwindow.h"
  
  MainWindow::MainWindow (QWidget* parent) : QMainWindow (parent), ui (new Ui::MainWindow)
  {
      ui-&gt;setupUi (this);
  
      //Add available algorithms to the combo box
      for (size_t i = 0; i &lt; MazeBuilder::algorithms.size(); i++)
      {
          ui-&gt;algorithmBox-&gt;addItem(MazeBuilder::algorithms.at(i).c_str());
      }
  }
  </code></pre>
  
  <p>MainWindow.h</p>
  
  <pre><code>#ifndef MAINWINDOW_H
  #define MAINWINDOW_H
  
  #include &lt;QMainWindow&gt;
  
  namespace Ui {
  class MainWindow;
  }
  
  class MainWindow : public QMainWindow
  {
      Q_OBJECT
  
  public:
      explicit MainWindow(QWidget* parent = nullptr);
  
  private:
      Ui::MainWindow* ui;
  
  };
  
  #endif // MAINWINDOW_H
  </code></pre>
  
  <p>MazeBuilder.cpp</p>
  
  <pre><code>#include "MazeBuilder.h"
  
  //Binds to MazeBuilder::MazeAlgorithm
  //const static std::vector&lt;std::string&gt; algorithms = {"Prim's"};
  const std::vector&lt;std::string&gt; MazeBuilder::algorithms = {"Prim's"};
  
  MazeBuilder::MazeBuilder()
  {
  
  }
  </code></pre>
  
  <p>MazeBuilder.h</p>
  
  <pre><code>#ifndef MAZEBUILDER_H
  #define MAZEBUILDER_H
  
  #include &lt;string&gt;
  #include &lt;vector&gt;
  
  class MazeBuilder
  {
  
  public:
      enum MazeAlgorithm
      {
          PRIM = 0
      };
      const static std::vector&lt;std::string&gt; algorithms;
  
      MazeBuilder();
  };
  
  #endif // MAZEBUILDER_H
  </code></pre>
  
  <p>ENTIRE PROJECT (SMALL) HERE: <a href="https://mega.nz/#!ruoRCZbQ!Jk79ATSO0POb9J_xkaAeNIy9ycVTnHkp1iT4Vq5XFoM" rel="nofollow noreferrer">https://mega.nz/#!ruoRCZbQ!Jk79ATSO0POb9J_xkaAeNIy9ycVTnHkp1iT4Vq5XFoM</a></p>