Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Trouble compiling #2

Open
harskish opened this issue Jul 13, 2022 · 4 comments
Open

Trouble compiling #2

harskish opened this issue Jul 13, 2022 · 4 comments

Comments

@harskish
Copy link

harskish commented Jul 13, 2022

Hi!

I'd love to use this project in my research, but I cannot seem to get it to compile. Configurations I've tried:

  • Ubuntu 20.04 (WSL), branch use-libimplot-so-3, with CYTHON:
    implot/cimplot.pxd:11:0: 'imgui/cimgui/ImGuiMouseButton.pxd' not found
  • Ubuntu 20.04 (WSL), branch use-libimplot-so-3, without CYTHON:
    implot-cpp/implot.h:26:10: fatal error: imgui.h: No such file or directory
  • Ubuntu 20.04 (WSL), branch main, with CYTHON:
    implot-cpp/implot.h:26:10: fatal error: imgui.h: No such file or directory
  • Ubuntu 20.04 (WSL), branch main, without CYTHON:
    config-cpp/py_imconfig.cpp:2:10: fatal error: plot.h: No such file or directory
  • Windows 11, branch use-libimplot-so-3, with CYTHON:
    implot\cimplot.pxd:11:0: 'imgui\cimgui\ImGuiMouseButton.pxd' not found
  • Windows 11, branch use-libimplot-so-3, without CYTHON:
    implot\cimplot.pxd:11:0: 'implot-cpp\implot.h(26): fatal error C1083: Cannot open include file: 'imgui.h': No such file or directory

If I work around the missing plot.h by unsetting PYIMGUI_CUSTOM_EXCEPTION, I still run into 'imgui.h': No such file or directory

Additionally, setup.py references 'imgui.data', but I cannot seem to find such a file or directory, where is it supposed to reside?

Would you be able to provide more up-to-date compilation instructions? Including information about which exact compiler and library versions are confirmed working? Also, which version of pyimgui should users install?

Thanks,
Erik

@hinxx
Copy link
Owner

hinxx commented Jul 16, 2022

I'll need to remind myself on how to do it :).
Gimme a couple of days, please, I'm not around the computer these days..

@hinxx
Copy link
Owner

hinxx commented Aug 25, 2022

Sorry for the late response.

I think you are on the right track using the use-libimplot-so-3 branch. Have you been using pyimgui use-libimgui-so-3 branch that I have here: https://github.com/hinxx/pyimgui/tree/use-libimgui-so-3 ?

IIRC, I did not do any special compilation tricks to get it to compile.

If you have time to read and want to see how for I got with this effort take a look at KinoxKlark/pyimgui#2. This is where I was discussing with the pyimgui dev on how to get the pyimplot and pyimgui work together and how to distribute both..

@hinxx
Copy link
Owner

hinxx commented Aug 25, 2022

I managed to go over the complete process on a Linux machine just now.
See notes.md.

This is the resulting demo screenshot:

Screenshot_2022-08-25_10-29-47

FYI, this is not a finished work as not all widgets and stuff of implot were ported to pyimplot. I also had doubts and open questions about how would pyimgui / pyimplot be packaged and distributed, used and/or coexist in a users python script. AFAICT, imgui/implot themselves were never meant to be used as shared libraries, something that we might want to have in case of pyimgui/pyimplot though, in order to not run into dependency issues or using different imgui code if it were embedded into pyimgui and pyimplot..

I'm not sure how far KinoxKlark has gotten with his efforts on pyimgui and maybe some of the open questions from that time are solved today; I'm afraid I do not have the time to dig deep into the pyimgui / pyimplot again.

Hope that helps!

@harskish
Copy link
Author

harskish commented Oct 3, 2022

Thanks for taking the time to document the compilation process!
Unfortunately, I still ran into issues on Windows following your instructions.
However, I did manage to get it to work by starting from pyimgui v2.0 (beta), adding implot as a submodule, and adding your implot porting efforts. In case you're interested, I've put that code here: https://github.com/harskish/pyimgui

I've also been playing around with another imgui+implot python library that uses pybind11 instead of Cython (joruof/imviz#3). Not sure which one I'll end up using.

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

No branches or pull requests

2 participants