Can't compile on Fedora
Closed this issue · 3 comments
Describe the bug
The ImGuiFileDialog.cmake script did not work! After fixing it finnished.
All went fine until the compiler hit ImWidgets.cpp, there where to many
errors to fix so I give up.
Desktop (please complete the following information):
- OS: [Linux, Fedora 36]
maybe you are using a recent version of imgui.
please use the version pointed by this repo..
Before I had read your answer I already removed my develop tree for fontstudio.
Cmake did his yob fine!
After a while compiling it hit the ImGuiFileDialog.cpp, below is what gcc spit out:
[ 49%] Building CXX object CMakeFiles/ImGuiFileDialog.dir/3rdparty/ImGuiFileDialog/ImGuiFileDialog.cpp.o
/Dev/ImGuiFontStudio/3rdparty/ImGuiFileDialog/ImGuiFileDialog.cpp: In member function ‘virtual bool IGFD::FileDialog::prDrawOkButton()’:
/Dev/ImGuiFontStudio/3rdparty/ImGuiFileDialog/ImGuiFileDialog.cpp:4223:79: error: cannot convert ‘ImVec2’ to ‘const char*’
4223 | if (IMGUI_BUTTON(okButtonString "##validationdialog", ImVec2(okButtonWidth, 0.0f)) || prFileDialogInternal.puIsOk)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| ImVec2
In file included from /Dev/ImGuiFontStudio/3rdparty/glad/include/../../../src/Gui/CustomImGuiFileDialogConfig.h:8,
from /Dev/ImGuiFontStudio/3rdparty/ImGuiFileDialog/ImGuiFileDialog.h:852,
from /Dev/ImGuiFontStudio/3rdparty/ImGuiFileDialog/ImGuiFileDialog.cpp:28:
/Dev/ImGuiFontStudio/src/Gui/ImWidgets.h:222:72: note: initializing argument 2 of ‘bool ImGui::ContrastedButton(const char*, const char*, ImFont*, float)’
222 | IMGUI_API bool ContrastedButton(const char* label, const char* help = nullptr, ImFont* imfont = nullptr, float vWidth = 0.0f);
| ~~~~~~~~~~~~^~~~~~~~~~~~~~
/Dev/ImGuiFontStudio/3rdparty/ImGuiFileDialog/ImGuiFileDialog.cpp: In member function ‘virtual bool IGFD::FileDialog::prDrawCancelButton()’:
/Dev/ImGuiFontStudio/3rdparty/ImGuiFileDialog/ImGuiFileDialog.cpp:4240:75: error: cannot convert ‘ImVec2’ to ‘const char*’
4240 | if (IMGUI_BUTTON(cancelButtonString "##validationdialog", ImVec2(cancelButtonWidth, 0.0f)) ||
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| ImVec2
/Dev/ImGuiFontStudio/src/Gui/ImWidgets.h:222:72: note: initializing argument 2 of ‘bool ImGui::ContrastedButton(const char*, const char*, ImFont*, float)’
222 | IMGUI_API bool ContrastedButton(const char* label, const char* help = nullptr, ImFont* imfont = nullptr, float vWidth = 0.0f);
| ~~~~~~~~~~~~^~~~~~~~~~~~~~
gmake[2]: *** [CMakeFiles/ImGuiFileDialog.dir/build.make:76: CMakeFiles/ImGuiFileDialog.dir/3rdparty/ImGuiFileDialog/ImGuiFileDialog.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:267: CMakeFiles/ImGuiFileDialog.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2
Thats it!
I leave it by this compile, and see what you came up whit.
By the way, imgui-docking IS changed. A couple of days ago!
like i said, you just need to use the version of the submodules of this repo.
it seems you have updated the submodules, so your compilation failed...
i dont care of the changes of imgui or other submodules,
because this repo use older imgui and older submodules version, and there is no compilation issue with it.
i just done a recursive checkout of the repo and have a sucsessfull compilation. tested on win and ubuntu. (like github action done)
so i said
maybe you are using a recent version of imgui.
please use the version pointed by this repo..
im now 100% sure than you have updated submodules for take the last version, and then founs some compilation bugs.
its normal since the last update is more than one year old. and no update will be done for one-two another year at least.