Updated to latest ImGui/CImGui version: : v1.91.4dock (2024/10)
This project is my experiment project to use Nim language, ImGui, ImPlot, futhark and etc.
For Linux Debian 12 Bookworm, Linux Mint
$ sudo apt install xorg-dev libopengl-dev libgl1-mesa-dev
and for glfw3 and sdl2,
$ sudo apt install libglfw3 libglfw3-dev
$ sudo apt install libsdl2-dev
nimble uninstall imguin # Remove old versions if exist.
nimble install https://github.com/dinau/imguin
First clone this project,
git clone https://github.com/dinau/imguin
Sample program is here, examples. For instance glfw_opengl3.nim,
cd imguin/examples/glfw_opengl3
make # or make run
After build, run ./glfw_opengl3(.exe)
For selecting static link or dynamic link ,read this examples/README.md.
These screen shots are on Windows10.
Showing UTF-8 label text and input text with my local country language.
Showing ImGui demo with ImPlot demo.
Git installed.
Installed MSys2/MinGW command line tools (Unix tools), make, cp, rm, ...etc
Windows10 or later Clang/LLVM refer to Futhark installation.
nimble install futhark
It must exist libclang.a
file in the library path (e.g. in c:\llvm\lib
).
Linux Debian 12 Bookworm
sudo apt install clang-16
nimble install --passL:"-L/usr/lib/llvm-16/lib" futhark
Important Notice: Confirm Futhark version is v0.13.6 at this time. (2024/09)
nimble dump futhark
name: "futhark"
version: "0.13.6"
author: "PMunch"
desc: "A package which uses libclang to parse C headers into Nim files for easy interop"
license: "MIT"
...
Compose development folders
First move to your working folder you like, then
mkdir imguin_dev
cd imguin_dev
git clone https://github.com/dinau/imguin
cd imguin
Clone ImGui/CImGui etc. sources at once forever
pwd
imguin
make clonelibs
Cloned libraries are under ../libs/
folder
Recursively update the sources using git Pull
or fetch
command in the each library folder,
../libs/cimgui
../libs/cimguizmo
../libs/cimnodes
../libs/cimplot
Checkout arbitrary version with git command in the respective folder
Specify your Clang
include path to ClangIncludePath
in imguin/src/imguin/cimgui.nim
.
Generate the definition file uisng Futhark,
pwd
imguin
make gen
Install updated files
Properly edit the version info etc in imguin.nimble
file, then
pwd
imguin
nimble uninstall imguin # Remove old versions if it exist.
nimble install
That's all.
Repeat from 3.
if you'd like to update or downgrade to other version.
Confirmed version
ImGui/CImGui Ver. | ImGuin Ver. | Date | WindowsOS | Linux Mint | Debian Bookworm (1) |
---|---|---|---|---|---|
1.91.4dock | 1.91.4.0 | 2024/10 | OK | OK | - |
1.91.3dock | 1.91.3.1 | 2024/10 | OK | (7) | - |
↑ | 1.91.3.0 | 2024/10 | OK | (7) | - |
1.91.2dock | 1.91.2.0 | 2024/10 | OK | (7) | - |
1.91.1dock | 1.91.1.2 | 2024/09 | OK | (6) | - |
1.91.1dock | 1.91.1.1 | 2024/09 | OK | - | - |
1.91.0dock | 1.91.0.1 | 2024/08 | OK | - | (7) |
↑ | 1.91.0.0 | 2024/08 | OK | - | (7) |
1.90.9dock | 1.90.9.4 | 2024/07 | OK | - | NG (5) |
↑ | 1.90.9.3 | 2024/07 | OK | - | NG (5) |
1.90.8dock | 1.90.8.1 | 2024/06 | OK | - | NG (5) |
↑ | 1.90.8.0 | 2024/06 | OK | - | NG (5) |
1.90.7dock | 1.90.7.0 | 2024/05 | OK | - | NG (5) |
1.90.6dock | 1.90.6.1 | 2024/05 | OK | - | NG (5) |
1.90.4dock | 1.90.4.3 | 2024/04 | OK | - | NG (5) |
- | - | - | - | - | - |
↑ | 1.90.4.2 | 2024/02 | OK | - | OK (4) |
1.90.1dock | 1.90.1.0 | 2024/01 | OK | - | NG/OK(1)(3)(4) |
1.89.9dock | 1.89.9.8 | 2023/12 | OK | - | NG/OK(1)(3)(4) |
(1): Except imnodes and SDL2 example.
(2): Doesn't work well.
(3): Works well only if it is compiled debug mode.
(4): Use nim-2.0.2
(5): I don't know why can't be compiled on Linux.
(6): OK: Except ImNodes example
(7): Not checked at this moment.
You might be able to use another C/C++ compiler,
Clang, vcc(Visual Studio C/C++) , zig cc
by changing variable TC
in examples/config.nims.common.
cimgui.dll
? (Now it can only be static link)nimble install imguin
?Install UPX
with MSys console on WindowsOS,
pacman -S mingw-w64-ucrt-x86_64-upx
For instance,
pwd
examples
cd glfw_opengl3_implot
make upx
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2024
UPX 4.2.4 Markus Oberhumer, Laszlo Molnar & John Reiser May 9th 2024
File size Ratio Format Name
-------------------- ------ ----------- -----------
7117824 -> 1217024 17.10% win64/pe glfw_opengl3_implot.exe
Decompressing,
make dupx
Result in,
Gcc + UPX : Gcc | Clang + UPX : Clang | MSVC(vcc) + UPX : MSVC | |
---|---|---|---|
glfw_opengl3.exe | 804 KB : 2360 KB | 720 KB : 2200 KB | 742 KB : 2070 KB |
glfw_opengl3_implot.exe | 1220 KB : 7120 KB | 940KB : 4200 KB | 945 KB : 3810 KB |
Gcc: v14.2.0, Clang: v18.1.8, MSVC: 2022
Windows11 (main)
Nim Compiler Version 2.2.0
Gcc (Rev1, Built by MSYS2 project) 14.2.0
pacman -S mingw-w64-ucrt-x86_64-gcc
Clang version 18.1.8
pacman -S mingw-w64-ucrt-x86_64-clang
Visual Studio C++/C 2022
git version 2.46.0.windows.1
SDL2.dll: 2.30.7
Make: GNU Make 4.4.1
MSys2/MinGW tools
Lnux Mint 22
File Dialog
Other
GUI
Graphical
Language | Binding | Project |
---|---|---|
Nim | CImGui/CImPlot | ImGuin, Nimgl_test, Nim_implot |
Lua | CImGui/CImPlot etc. | LuaJITImGui |
Zig, C lang. | Dear bindings | Dear_Bindings_Build |
Zig | CImGui/CImPlot | ImGuinZ |
Python | ImGui direct | DearPyGui for 32bit WindowsOS Binary |