title: Integrating SFML-VScode-boilerplate with ImGui
body: <p>I followed this <a href="https://youtu.be/2YS5WJTeKpI" rel="nofollow noreferrer">tutorial</a> in order to use ImGui with <a href="https://github.com/rewrking/sfml-vscode-boilerplate" rel="nofollow noreferrer">sfml-vscode-boilerplate</a> on VScode (macOS). However, the content of this <a href="https://youtu.be/2YS5WJTeKpI" rel="nofollow noreferrer">video</a> is about integrating ImGui with SFML in Visual Studio. So I could not repeat every process in that video.</p>
  <p>When I executed Program by pressing Ctrl+Shift+B and click on the Build &amp; Run Debug option, I got this <a href="https://i.stack.imgur.com/e7pM8.png" rel="nofollow noreferrer">error</a></p>
  <pre><code>⬤  Build &amp; Run: Debug (target: IMGUISFML)
  
  
  ⇛  Linking: bin/Debug/IMGUISFMLUndefined symbols for architecture x86_64:
    &quot;ImGui::End()&quot;, referenced from:
        _main in Main.cpp.o
    &quot;ImGui::SFML::ProcessEvent(sf::Window const&amp;, sf::Event const&amp;)&quot;, referenced from:
        _main in Main.cpp.o
    &quot;ImGui::SFML::Render(sf::RenderWindow&amp;)&quot;, referenced from:
        _main in Main.cpp.o
    &quot;ImGui::SFML::Update(sf::RenderWindow&amp;, sf::Time)&quot;, referenced from:
        _main in Main.cpp.o
    &quot;ImGui::SFML::Shutdown()&quot;, referenced from:
        _main in Main.cpp.o
    &quot;ImGui::Begin(char const*, bool*, int)&quot;, referenced from:
        _main in Main.cpp.o
    &quot;ImGui::Button(char const*, ImVec2 const&amp;)&quot;, referenced from:
        _main in Main.cpp.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  make[1]: *** [bin/Debug/IMGUISFML] Error 1
  make: *** [all] Error 2
  
  ✘  Failed!
     Review the compile errors above.
  
  The terminal process &quot;/bin/zsh '-c', 'bash ./build.sh buildrun Debug vscode'&quot; terminated with exit code: 1.
  
  Terminal will be reused by tasks, press any key to close it.
  </code></pre>
  <p>Here is my file structure. (This folder is identical to <a href="https://github.com/rewrking/sfml-vscode-boilerplate" rel="nofollow noreferrer">sfml-vscode-boilerplate</a>, except imgui folder is added.)</p>
  <ul>
  <li><p>.vscode</p>
  <ul>
  <li>_keybindings.json</li>
  <li>c_cpp_properties.json</li>
  <li>launch.json</li>
  <li>settings.json</li>
  <li>tasks.json</li>
  </ul>
  </li>
  <li><p>bin</p>
  </li>
  <li><p>content</p>
  </li>
  <li><p>env</p>
  </li>
  <li><p>imgui</p>
  <ul>
  <li>imconfig-SFML.h</li>
  <li>imconfig.h</li>
  <li>imgui_draw.cpp</li>
  <li>imgui_internal.h</li>
  <li>imgui_tables.cpp</li>
  <li>imgui_widgets.cpp</li>
  <li>imgui-SFML_export.h</li>
  <li>imgui_SFML.cpp</li>
  <li>imgui_SFML.h</li>
  <li>imgui.cpp</li>
  <li>imgui.h</li>
  <li>imstb_rectpack.h</li>
  <li>imgstb_textedit.h</li>
  <li>imgstb_truetype.h</li>
  </ul>
  </li>
  <li><p>lib</p>
  </li>
  <li><p>src</p>
  <ul>
  <li>Platform</li>
  <li>Utility</li>
  <li>Main.cpp</li>
  <li>PCH.hpp</li>
  </ul>
  </li>
  <li><p>test</p>
  </li>
  <li><p>.clang-format</p>
  </li>
  <li><p>.gitignore</p>
  </li>
  <li><p>build.sh</p>
  </li>
  <li><p>Makefile</p>
  </li>
  <li><p>README.md</p>
  </li>
  </ul>
  <pre class="lang-cpp prettyprint-override"><code>//Here is &quot;Main.cpp&quot; file
  #include &quot;../imgui/imgui.h&quot;
  #include &quot;../imgui/imgui-SFML.h&quot;
  
  #include &quot;Platform/Platform.hpp&quot;
  
  int main()
  {
      sf::RenderWindow window(sf::VideoMode(640, 480), &quot;ImGui + SFML = &lt;3&quot;);
      window.setFramerateLimit(60);
      //ImGui::SFML::Init(window);
  
      sf::CircleShape shape(100.f);
      shape.setFillColor(sf::Color::Green);
  
      sf::Clock deltaClock;
      while (window.isOpen()) {
          sf::Event event;
          while (window.pollEvent(event)) {
              ImGui::SFML::ProcessEvent(window, event);
  
              if (event.type == sf::Event::Closed) {
                  window.close();
              }
          }
  
          ImGui::SFML::Update(window, deltaClock.restart());
  
          ImGui::Begin(&quot;Hello, world!&quot;);
          ImGui::Button(&quot;Look at this pretty button&quot;);
          ImGui::End();
  
          window.clear();
          window.draw(shape);
          ImGui::SFML::Render(window);
          window.display();
      }
  
      ImGui::SFML::Shutdown();
  }
  </code></pre>
  <p>What should I do in order to integrate SFML with ImGui on VScode (macOS). Also, if ImGui is not available, is there another free recommended alternative C++ GUI Library?</p>
  <p>Thank you for reading my message.</p>