Skip to content

Mismatched Version String for imgui.cpp when try to run compiled example of implot_demos #8658

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

Closed
glanzkaiser opened this issue May 27, 2025 · 2 comments
Labels

Comments

@glanzkaiser
Copy link

Version/Branch of Dear ImGui:

Version 1.91.9b, Release

Back-ends:

imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp

Compiler, OS:

Linux + GCC

Full config/build information:

No response

Details:

My Issue/Question:

I was trying to run an example from 1st demo of implot_demos

The compilation is successful. But the problem is when I run the executable it closes the window in an instant and shows this error message: (attached on screenshot).

Btw, in /usr/include/imgui (the default path for include files in Linux OS) I put the include files of imgui from older version for learning Box2D v 2.4.1, maybe this is the case. I know that if I replace the include files here, then I could not use my Box2D anymore. But I did try (create the backup and replace the include files with the newest imgui that I use for implot_demos), but this is still not working.

Is there any solution here?

Screenshots/Video:

Image

Minimal, Complete and Verifiable Example code:

#include "App.h"

struct ImPlotDemo : App {
    using App::App;
    void Update() override {
        ImPlot::ShowDemoWindow();   
    }
};

int main(int argc, char const *argv[])
{
    ImPlotDemo app("ImPlot Demo",1920,1080,argc,argv);
    app.Run();

    return 0;
}

This is a portion of the Makefile that I use to compile, maybe it can be of used to diagnose my problem here (the libraries are all static libapp.a, libimgui.a, libimnodes.a, libimplot.a):


EXE = main
IMGUI_DIR = ../..
SOURCES = main.cpp
SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
SOURCES += $(IMGUI_DIR)/backends/imgui_impl_glfw.cpp $(IMGUI_DIR)/backends/imgui_impl_opengl3.cpp
SOURCES += $(IMGUI_DIR)/implot.cpp $(IMGUI_DIR)/implot_demo.cpp $(IMGUI_DIR)/implot_items.cpp
OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
UNAME_S := $(shell uname -s)
LINUX_GL_LIBS = -lGL

CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
CXXFLAGS += -g -Wall -Wformat
LIBS = ../../dependencies/glad.c -L../../dependencies/ -lapp -limgui -limnodes -limplot

....

@ocornut
Copy link
Owner

ocornut commented May 27, 2025

It means that header version is not matching the compiled/linked version so it’s a build issue on your end.

@glanzkaiser
Copy link
Author

I have made it work just now,

There are some error in Linux because some codes are designated for Windows and also need library imm32 in CMakeLists.txt that I don't know what that is, so I just delete the need for that library.

Thanks a lot.

The spectogram demos works nice. Imgui is amazing.

Image

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

No branches or pull requests

2 participants