SFML / imgui-sfml

Dear ImGui backend for use with SFML
MIT License
1.15k stars 172 forks source link

imgui-sfml build failed when imgui update to 1.91.4 #299

Closed LilyWangLL closed 1 month ago

LilyWangLL commented 1 month ago

The latest version of imgui is 1.91.4, I updated my local imgui to 1.91.4, but imgui-sfml build failed with the following error, could someone please take a look at this issue?

[1/3] C:\PROGRA~1\MICROS~3\2022\ENTERP~1\VC\Tools\MSVC\1441~1.341\bin\Hostx64\x64\cl.exe   /TP -DGLFW_DLL -DIMGUI_ENABLE_FREETYPE -DIMGUI_ENABLE_FREETYPE_LUNASVG -DIMGUI_USER_CONFIG=\"imconfig-SFML.h\" -DIMGUI_USE_WCHAR32 -IF:\vcpkg\buildtrees\imgui-sfml\src\v2.6-1dc04eadfd.clean -external:IF:\vcpkg\installed\x64-windows\include -external:IF:\vcpkg\installed\x64-windows\include\SDL2 -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\ImGui-SFML.dir\imgui-SFML.cpp.obj /FdCMakeFiles\ImGui-SFML.dir\ImGui-SFML.pdb /FS -c F:\vcpkg\buildtrees\imgui-sfml\src\v2.6-1dc04eadfd.clean\imgui-SFML.cpp
FAILED: CMakeFiles/ImGui-SFML.dir/imgui-SFML.cpp.obj 
C:\PROGRA~1\MICROS~3\2022\ENTERP~1\VC\Tools\MSVC\1441~1.341\bin\Hostx64\x64\cl.exe   /TP -DGLFW_DLL -DIMGUI_ENABLE_FREETYPE -DIMGUI_ENABLE_FREETYPE_LUNASVG -DIMGUI_USER_CONFIG=\"imconfig-SFML.h\" -DIMGUI_USE_WCHAR32 -IF:\vcpkg\buildtrees\imgui-sfml\src\v2.6-1dc04eadfd.clean -external:IF:\vcpkg\installed\x64-windows\include -external:IF:\vcpkg\installed\x64-windows\include\SDL2 -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\ImGui-SFML.dir\imgui-SFML.cpp.obj /FdCMakeFiles\ImGui-SFML.dir\ImGui-SFML.pdb /FS -c F:\vcpkg\buildtrees\imgui-sfml\src\v2.6-1dc04eadfd.clean\imgui-SFML.cpp
F:\vcpkg\buildtrees\imgui-sfml\src\v2.6-1dc04eadfd.clean\imgui-SFML.cpp(1024): error C2665: 'ImGui::ImageButton': no overloaded function could convert all the argument types
F:\vcpkg\installed\x64-windows\include\imgui.h(575): note: could be 'bool ImGui::ImageButton(const char *,ImTextureID,const ImVec2 &,const ImVec2 &,const ImVec2 &,const ImVec4 &,const ImVec4 &)'
F:\vcpkg\buildtrees\imgui-sfml\src\v2.6-1dc04eadfd.clean\imgui-SFML.cpp(1024): note: 'bool ImGui::ImageButton(const char *,ImTextureID,const ImVec2 &,const ImVec2 &,const ImVec2 &,const ImVec4 &,const ImVec4 &)': cannot convert argument 1 from 'ImTextureID' to 'const char *'
F:\vcpkg\buildtrees\imgui-sfml\src\v2.6-1dc04eadfd.clean\imgui-SFML.cpp(1024): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or parenthesized function-style cast
F:\vcpkg\buildtrees\imgui-sfml\src\v2.6-1dc04eadfd.clean\imgui-SFML.cpp(1024): note: while trying to match the argument list '(ImTextureID, ImVec2, ImVec2, ImVec2, const int, ImColor, ImColor)'
F:\vcpkg\buildtrees\imgui-sfml\src\v2.6-1dc04eadfd.clean\imgui-SFML.cpp(1041): error C2665: 'ImGui::ImageButton': no overloaded function could convert all the argument types
F:\vcpkg\installed\x64-windows\include\imgui.h(575): note: could be 'bool ImGui::ImageButton(const char *,ImTextureID,const ImVec2 &,const ImVec2 &,const ImVec2 &,const ImVec4 &,const ImVec4 &)'
F:\vcpkg\buildtrees\imgui-sfml\src\v2.6-1dc04eadfd.clean\imgui-SFML.cpp(1041): note: 'bool ImGui::ImageButton(const char *,ImTextureID,const ImVec2 &,const ImVec2 &,const ImVec2 &,const ImVec4 &,const ImVec4 &)': cannot convert argument 1 from 'ImTextureID' to 'const char *'
F:\vcpkg\buildtrees\imgui-sfml\src\v2.6-1dc04eadfd.clean\imgui-SFML.cpp(1041): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or parenthesized function-style cast
F:\vcpkg\buildtrees\imgui-sfml\src\v2.6-1dc04eadfd.clean\imgui-SFML.cpp(1041): note: while trying to match the argument list '(ImTextureID, ImVec2, ImVec2, ImVec2, const int, ImColor, ImColor)'
F:\vcpkg\buildtrees\imgui-sfml\src\v2.6-1dc04eadfd.clean\imgui-SFML.cpp(1075): error C2665: 'ImGui::ImageButton': no overloaded function could convert all the argument types
F:\vcpkg\installed\x64-windows\include\imgui.h(575): note: could be 'bool ImGui::ImageButton(const char *,ImTextureID,const ImVec2 &,const ImVec2 &,const ImVec2 &,const ImVec4 &,const ImVec4 &)'
F:\vcpkg\buildtrees\imgui-sfml\src\v2.6-1dc04eadfd.clean\imgui-SFML.cpp(1075): note: 'bool ImGui::ImageButton(const char *,ImTextureID,const ImVec2 &,const ImVec2 &,const ImVec2 &,const ImVec4 &,const ImVec4 &)': cannot convert argument 1 from 'ImTextureID' to 'const char *'
F:\vcpkg\buildtrees\imgui-sfml\src\v2.6-1dc04eadfd.clean\imgui-SFML.cpp(1075): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or parenthesized function-style cast
F:\vcpkg\buildtrees\imgui-sfml\src\v2.6-1dc04eadfd.clean\imgui-SFML.cpp(1075): note: while trying to match the argument list '(ImTextureID, ImVec2, ImVec2, ImVec2, const int, ImColor, ImColor)'
ninja: build stopped: subcommand failed.
ChrisThrasher commented 1 month ago

See also #298

Fixed by https://github.com/SFML/imgui-sfml/commit/251e53d2e5e3b78da3533b1fe96e3b9e899c2399