Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling geogram with the latest version of imgui in vcpkg fails to compile #89

Open
jimwang118 opened this issue Jul 12, 2023 · 10 comments

Comments

@jimwang118
Copy link

1.The version of imgui used by geogram in the library is 1.89.4, but some errors appear when compiling with the latest version of imgui.
F:\vcpkg\buildtrees\geogram\src\v1.8.3-0e25e29abd\src\lib\geogram_gfx\ImGui_ext\imgui_ext.cpp(409,35): error C2065: 'ImGuiWindowFlags_NoDocking': undeclared identifier

2.The latest version of imgui deletes the definition of the following variables.

ImGuiWindowFlags_NoDocking
ImGuiCol_DockingPreview
ImGuiCol_DockingEmptyBg

3.Does geogram compilation have to rely on imgui version 1.89.4 or will it be updated to the latest version imgui?

@BrunoLevy
Copy link
Owner

It will be updated in next release.

@BrunoLevy
Copy link
Owner

BrunoLevy commented Jul 21, 2023

It is weird, I have updated to imgui 1.89.5 WIP, and there three constants are there (and are not declared as deprecated either). Are you sure you are not using an older (instead of more recent) version of imgui ?

@jimwang118
Copy link
Author

It is weird, I have updated to imgui 1.89.8 WIP, and there three constants are there (and are not declared as deprecated either). Are you sure you are not using an older (instead of more recent) version of imgui ?

src\lib\geogram_gfx\third_party\imgui, the imgui used in this path is still version 1.89.4, and imgui is a link when installing in vcpkg, and the code will not be downloaded automatically.

@BrunoLevy
Copy link
Owner

BrunoLevy commented Jul 24, 2023

Oooh I think I see, the version of the docking branch may be different.

@jimwang118
Copy link
Author

If the graphics feature is enabled when installing geogram, an error will be reported that imgui/imgui.cpp cannot be found.

@BrunoLevy
Copy link
Owner

BrunoLevy commented Jul 24, 2023

I see that docking branch's imgui.h has a version 1.89.8. It has the three constants.

I guess that the folks who packaged it for vcpkg did not pull the docking branch. Do you know if there is a way to report the issues to them ? (I am not familiar with vcpkg)

Best thing to do is probably filing an issue here

@BrunoLevy
Copy link
Owner

Would you explain me how to reproduce the problem ? (which command did you type ?), I'm not familiar with vcpkg.
I may have an idea to make it work with a version of imgui that does not have the docking branch...

@jimwang118
Copy link
Author

Host Environment

Host: x64-osx
Compiler: AppleClang 14.0.3.14030022
vcpkg package management program version 2023-06-22-f19f3d9939100085fe2f7e41502d60b08e2083b6

Steps to reproduce:

1. git clone vcpkg
2. cd vcpkg & .\bootstrap-vcpkg.bat
3. .\vcpkg install geogram"[graphics]"

@BrunoLevy
Copy link
Owner

Thanks ! (I'll take a look and tell you)

@BrunoLevy
Copy link
Owner

BrunoLevy commented Jul 28, 2023

Examining the geogram port for vcpkg, I think that:

  • vcpkg does not know about geogram depending on imgui
  • there may be a version of imgui installed in your system (else it would complain about not finding it)
  • this version of imgui does not have the docking and viewport branches (required by geogram)

The "right way" of doing it will be sending a pull request to vcpkg package maintainer that insert the correct dependency to imgui in the geogram vcpkg package.

I have seen you have done it already here, wonderful !

In the meanwhile, before the vcpkg package is fixed, you may install and compile on your own dearimgui (with the docking and the viewport branches):

  1. Get the docking and viewport branch of imgui:
   git clone --branch docking https://github.com/ocornut/imgui.git
  1. Compile and install it in your system
    (depends on your system and on where vcpkg expects to find it, you may search for the existing version of imgui.h in your system to figure out)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants