ocornut / imgui

Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
MIT License
60.24k stars 10.2k forks source link

Setting up a simple Dear ImGui project from scratch #6929

Closed TomyFrank closed 11 months ago

TomyFrank commented 11 months ago

I've compiled the lastest version of Dear ImGui (docking branch) on my VS 2022 on Windows suceessfully. The examples work fine too. As begginer of using Dear ImGui I'm interested in creating a project from scratch. I tried much to take advantages of Getting started, FAQ and Wiki sections in addition to Google as much as I could, for that purpose, yet am not able to approprately make a project from scratch using this libray which makes it possible to create GUI projects using C++ fast and easily.

The project is very simple and the purpose is mostly learning how to use Dear ImGui better. Suppose we need a very simple project that merely shows a circle and a line crossing it. First, on VS configuration settings, I added the path to ImGui\MyApplication\backends\examples\libs\glfw\include and ImGui\MyApplication\backends to the project properties -> Additional Include Directories and in Linker -> General -> Additional Library Directories added \ImGui\MyApplication\examples\libs\glfw\lib-vc2010-64. The code in the image below addresses must of the purpose to me but yet I get a couple of errors.

undefined - Imgur

How to fix those errors, or, how would you create such a project from scratch, please?

ocornut commented 11 months ago

This is mostly a C++ usage question. We cannot normally provide this sort of support here as this is way outside our scope. You should be comparing your code to the provided examples to understand and study the differences.

Some hint through: