Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - TRI99ER

Pages: [1]
1
General / Re: Strange compiler errors in imgui-SFML.cpp code
« on: September 18, 2024, 09:21:59 am »
Thank you, that was it. It solved the compiler and linker errors.

2
General / Re: Strange compiler errors in imgui-SFML.cpp code
« on: September 17, 2024, 01:39:07 pm »
New set of errors:
Quote
1>sfml-graphics-s-d.lib(RenderTarget.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(RenderTarget.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(Texture.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(Texture.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(RenderTexture.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(RenderTexture.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(Sprite.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(Sprite.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(Transformable.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(Transformable.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(Color.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(Color.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(Shape.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(Shape.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(CircleShape.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(CircleShape.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(Font.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(Font.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(RenderWindow.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(RenderWindow.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(Text.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(Text.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(RenderStates.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(RenderStates.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(Transform.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(Transform.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(View.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(View.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(BlendMode.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(BlendMode.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(Vertex.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(Vertex.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(Shader.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(Shader.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(VertexBuffer.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(VertexBuffer.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(GLExtensions.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(GLExtensions.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(GLCheck.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(GLCheck.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(Image.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(Image.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(TextureSaver.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(TextureSaver.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(RenderTextureImplFBO.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(RenderTextureImplFBO.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(RenderTextureImplDefault.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(RenderTextureImplDefault.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(VertexArray.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(VertexArray.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(Glsl.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(Glsl.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(ImageLoader.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(ImageLoader.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(RenderTextureImpl.obj) : warning LNK4099: PDB '' was not found with 'sfml-graphics-s-d.lib(RenderTextureImpl.obj)' or at ''; linking object as if no debug info
1>sfml-window-s-d.lib(Joystick.obj) : warning LNK4099: PDB '' was not found with 'sfml-window-s-d.lib(Joystick.obj)' or at ''; linking object as if no debug info
1>sfml-window-s-d.lib(Cursor.obj) : warning LNK4099: PDB '' was not found with 'sfml-window-s-d.lib(Cursor.obj)' or at ''; linking object as if no debug info
1>sfml-window-s-d.lib(WindowBase.obj) : warning LNK4099: PDB '' was not found with 'sfml-window-s-d.lib(WindowBase.obj)' or at ''; linking object as if no debug info
1>sfml-window-s-d.lib(Clipboard.obj) : warning LNK4099: PDB '' was not found with 'sfml-window-s-d.lib(Clipboard.obj)' or at ''; linking object as if no debug info
1>sfml-window-s-d.lib(Mouse.obj) : warning LNK4099: PDB '' was not found with 'sfml-window-s-d.lib(Mouse.obj)' or at ''; linking object as if no debug info
1>sfml-window-s-d.lib(Touch.obj) : warning LNK4099: PDB '' was not found with 'sfml-window-s-d.lib(Touch.obj)' or at ''; linking object as if no debug info
1>sfml-window-s-d.lib(VideoMode.obj) : warning LNK4099: PDB '' was not found with 'sfml-window-s-d.lib(VideoMode.obj)' or at ''; linking object as if no debug info
1>sfml-window-s-d.lib(Window.obj) : warning LNK4099: PDB '' was not found with 'sfml-window-s-d.lib(Window.obj)' or at ''; linking object as if no debug info
1>sfml-window-s-d.lib(Context.obj) : warning LNK4099: PDB '' was not found with 'sfml-window-s-d.lib(Context.obj)' or at ''; linking object as if no debug info
1>sfml-window-s-d.lib(GlResource.obj) : warning LNK4099: PDB '' was not found with 'sfml-window-s-d.lib(GlResource.obj)' or at ''; linking object as if no debug info
1>sfml-window-s-d.lib(JoystickManager.obj) : warning LNK4099: PDB '' was not found with 'sfml-window-s-d.lib(JoystickManager.obj)' or at ''; linking object as if no debug info
1>sfml-window-s-d.lib(CursorImpl.obj) : warning LNK4099: PDB '' was not found with 'sfml-window-s-d.lib(CursorImpl.obj)' or at ''; linking object as if no debug info
1>sfml-window-s-d.lib(WindowImpl.obj) : warning LNK4099: PDB '' was not found with 'sfml-window-s-d.lib(WindowImpl.obj)' or at ''; linking object as if no debug info
1>sfml-window-s-d.lib(ClipboardImpl.obj) : warning LNK4099: PDB '' was not found with 'sfml-window-s-d.lib(ClipboardImpl.obj)' or at ''; linking object as if no debug info
1>sfml-window-s-d.lib(InputImpl.obj) : warning LNK4099: PDB '' was not found with 'sfml-window-s-d.lib(InputImpl.obj)' or at ''; linking object as if no debug info
1>sfml-window-s-d.lib(VideoModeImpl.obj) : warning LNK4099: PDB '' was not found with 'sfml-window-s-d.lib(VideoModeImpl.obj)' or at ''; linking object as if no debug info
1>sfml-window-s-d.lib(GlContext.obj) : warning LNK4099: PDB '' was not found with 'sfml-window-s-d.lib(GlContext.obj)' or at ''; linking object as if no debug info
1>sfml-window-s-d.lib(JoystickImpl.obj) : warning LNK4099: PDB '' was not found with 'sfml-window-s-d.lib(JoystickImpl.obj)' or at ''; linking object as if no debug info
1>sfml-window-s-d.lib(SensorManager.obj) : warning LNK4099: PDB '' was not found with 'sfml-window-s-d.lib(SensorManager.obj)' or at ''; linking object as if no debug info
1>sfml-window-s-d.lib(WindowImplWin32.obj) : warning LNK4099: PDB '' was not found with 'sfml-window-s-d.lib(WindowImplWin32.obj)' or at ''; linking object as if no debug info
1>sfml-window-s-d.lib(VulkanImplWin32.obj) : warning LNK4099: PDB '' was not found with 'sfml-window-s-d.lib(VulkanImplWin32.obj)' or at ''; linking object as if no debug info
1>sfml-window-s-d.lib(WglContext.obj) : warning LNK4099: PDB '' was not found with 'sfml-window-s-d.lib(WglContext.obj)' or at ''; linking object as if no debug info
1>sfml-window-s-d.lib(SensorImpl.obj) : warning LNK4099: PDB '' was not found with 'sfml-window-s-d.lib(SensorImpl.obj)' or at ''; linking object as if no debug info
1>sfml-system-s-d.lib(Time.obj) : warning LNK4099: PDB '' was not found with 'sfml-system-s-d.lib(Time.obj)' or at ''; linking object as if no debug info
1>sfml-system-s-d.lib(String.obj) : warning LNK4099: PDB '' was not found with 'sfml-system-s-d.lib(String.obj)' or at ''; linking object as if no debug info
1>sfml-system-s-d.lib(Clock.obj) : warning LNK4099: PDB '' was not found with 'sfml-system-s-d.lib(Clock.obj)' or at ''; linking object as if no debug info
1>sfml-system-s-d.lib(Mutex.obj) : warning LNK4099: PDB '' was not found with 'sfml-system-s-d.lib(Mutex.obj)' or at ''; linking object as if no debug info
1>sfml-system-s-d.lib(Lock.obj) : warning LNK4099: PDB '' was not found with 'sfml-system-s-d.lib(Lock.obj)' or at ''; linking object as if no debug info
1>sfml-system-s-d.lib(Err.obj) : warning LNK4099: PDB '' was not found with 'sfml-system-s-d.lib(Err.obj)' or at ''; linking object as if no debug info
1>sfml-system-s-d.lib(Sleep.obj) : warning LNK4099: PDB '' was not found with 'sfml-system-s-d.lib(Sleep.obj)' or at ''; linking object as if no debug info
1>sfml-system-s-d.lib(ThreadLocal.obj) : warning LNK4099: PDB '' was not found with 'sfml-system-s-d.lib(ThreadLocal.obj)' or at ''; linking object as if no debug info
1>sfml-system-s-d.lib(ClockImpl.obj) : warning LNK4099: PDB '' was not found with 'sfml-system-s-d.lib(ClockImpl.obj)' or at ''; linking object as if no debug info
1>sfml-system-s-d.lib(MutexImpl.obj) : warning LNK4099: PDB '' was not found with 'sfml-system-s-d.lib(MutexImpl.obj)' or at ''; linking object as if no debug info
1>sfml-system-s-d.lib(SleepImpl.obj) : warning LNK4099: PDB '' was not found with 'sfml-system-s-d.lib(SleepImpl.obj)' or at ''; linking object as if no debug info
1>sfml-system-s-d.lib(ThreadLocalImpl.obj) : warning LNK4099: PDB '' was not found with 'sfml-system-s-d.lib(ThreadLocalImpl.obj)' or at ''; linking object as if no debug info
1>sfml-graphics-s-d.lib(Font.obj) : error LNK2019: unresolved external symbol FT_Init_FreeType referenced in function "public: bool __cdecl sf::Font::loadFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?loadFromFile@Font@sf@@QEAA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>sfml-graphics-s-d.lib(Font.obj) : error LNK2019: unresolved external symbol FT_Done_FreeType referenced in function "private: void __cdecl sf::Font::cleanup(void)" (?cleanup@Font@sf@@AEAAXXZ)
1>sfml-graphics-s-d.lib(Font.obj) : error LNK2019: unresolved external symbol FT_New_Face referenced in function "public: bool __cdecl sf::Font::loadFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?loadFromFile@Font@sf@@QEAA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>sfml-graphics-s-d.lib(Font.obj) : error LNK2019: unresolved external symbol FT_New_Memory_Face referenced in function "public: bool __cdecl sf::Font::loadFromMemory(void const *,unsigned __int64)" (?loadFromMemory@Font@sf@@QEAA_NPEBX_K@Z)
1>sfml-graphics-s-d.lib(Font.obj) : error LNK2019: unresolved external symbol FT_Open_Face referenced in function "public: bool __cdecl sf::Font::loadFromStream(class sf::InputStream &)" (?loadFromStream@Font@sf@@QEAA_NAEAVInputStream@2@@Z)
1>sfml-graphics-s-d.lib(Font.obj) : error LNK2019: unresolved external symbol FT_Done_Face referenced in function "public: bool __cdecl sf::Font::loadFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?loadFromFile@Font@sf@@QEAA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>sfml-graphics-s-d.lib(Font.obj) : error LNK2019: unresolved external symbol FT_Set_Pixel_Sizes referenced in function "private: bool __cdecl sf::Font::setCurrentSize(unsigned int)const " (?setCurrentSize@Font@sf@@AEBA_NI@Z)
1>sfml-graphics-s-d.lib(Font.obj) : error LNK2019: unresolved external symbol FT_Load_Char referenced in function "private: class sf::Glyph __cdecl sf::Font::loadGlyph(unsigned int,unsigned int,bool,float)const " (?loadGlyph@Font@sf@@AEBA?AVGlyph@2@II_NM@Z)
1>sfml-graphics-s-d.lib(Font.obj) : error LNK2019: unresolved external symbol FT_Get_Kerning referenced in function "public: float __cdecl sf::Font::getKerning(unsigned int,unsigned int,unsigned int,bool)const " (?getKerning@Font@sf@@QEBAMIII_N@Z)
1>sfml-graphics-s-d.lib(Font.obj) : error LNK2019: unresolved external symbol FT_Select_Charmap referenced in function "public: bool __cdecl sf::Font::loadFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?loadFromFile@Font@sf@@QEAA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>sfml-graphics-s-d.lib(Font.obj) : error LNK2019: unresolved external symbol FT_Get_Char_Index referenced in function "public: class sf::Glyph const & __cdecl sf::Font::getGlyph(unsigned int,unsigned int,bool,float)const " (?getGlyph@Font@sf@@QEBAAEBVGlyph@2@II_NM@Z)
1>sfml-graphics-s-d.lib(Font.obj) : error LNK2019: unresolved external symbol FT_MulFix referenced in function "public: float __cdecl sf::Font::getUnderlinePosition(unsigned int)const " (?getUnderlinePosition@Font@sf@@QEBAMI@Z)
1>sfml-graphics-s-d.lib(Font.obj) : error LNK2019: unresolved external symbol FT_Get_Glyph referenced in function "private: class sf::Glyph __cdecl sf::Font::loadGlyph(unsigned int,unsigned int,bool,float)const " (?loadGlyph@Font@sf@@AEBA?AVGlyph@2@II_NM@Z)
1>sfml-graphics-s-d.lib(Font.obj) : error LNK2019: unresolved external symbol FT_Glyph_To_Bitmap referenced in function "private: class sf::Glyph __cdecl sf::Font::loadGlyph(unsigned int,unsigned int,bool,float)const " (?loadGlyph@Font@sf@@AEBA?AVGlyph@2@II_NM@Z)
1>sfml-graphics-s-d.lib(Font.obj) : error LNK2019: unresolved external symbol FT_Done_Glyph referenced in function "private: class sf::Glyph __cdecl sf::Font::loadGlyph(unsigned int,unsigned int,bool,float)const " (?loadGlyph@Font@sf@@AEBA?AVGlyph@2@II_NM@Z)
1>sfml-graphics-s-d.lib(Font.obj) : error LNK2019: unresolved external symbol FT_Outline_Embolden referenced in function "private: class sf::Glyph __cdecl sf::Font::loadGlyph(unsigned int,unsigned int,bool,float)const " (?loadGlyph@Font@sf@@AEBA?AVGlyph@2@II_NM@Z)
1>sfml-graphics-s-d.lib(Font.obj) : error LNK2019: unresolved external symbol FT_Bitmap_Embolden referenced in function "private: class sf::Glyph __cdecl sf::Font::loadGlyph(unsigned int,unsigned int,bool,float)const " (?loadGlyph@Font@sf@@AEBA?AVGlyph@2@II_NM@Z)
1>sfml-graphics-s-d.lib(Font.obj) : error LNK2019: unresolved external symbol FT_Stroker_New referenced in function "public: bool __cdecl sf::Font::loadFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?loadFromFile@Font@sf@@QEAA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>sfml-graphics-s-d.lib(Font.obj) : error LNK2019: unresolved external symbol FT_Stroker_Set referenced in function "private: class sf::Glyph __cdecl sf::Font::loadGlyph(unsigned int,unsigned int,bool,float)const " (?loadGlyph@Font@sf@@AEBA?AVGlyph@2@II_NM@Z)
1>sfml-graphics-s-d.lib(Font.obj) : error LNK2019: unresolved external symbol FT_Stroker_Done referenced in function "public: bool __cdecl sf::Font::loadFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?loadFromFile@Font@sf@@QEAA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>sfml-graphics-s-d.lib(Font.obj) : error LNK2019: unresolved external symbol FT_Glyph_Stroke referenced in function "private: class sf::Glyph __cdecl sf::Font::loadGlyph(unsigned int,unsigned int,bool,float)const " (?loadGlyph@Font@sf@@AEBA?AVGlyph@2@II_NM@Z)
1>sfml-window-s-d.lib(JoystickImpl.obj) : error LNK2019: unresolved external symbol __imp_joyGetPosEx referenced in function "public: static bool __cdecl sf::priv::JoystickImpl::isConnected(unsigned int)" (?isConnected@JoystickImpl@priv@sf@@SA_NI@Z)
1>sfml-window-s-d.lib(JoystickImpl.obj) : error LNK2019: unresolved external symbol __imp_joyGetDevCapsW referenced in function "public: bool __cdecl sf::priv::JoystickImpl::open(unsigned int)" (?open@JoystickImpl@priv@sf@@QEAA_NI@Z)
1>sfml-system-s-d.lib(SleepImpl.obj) : error LNK2019: unresolved external symbol __imp_timeGetDevCaps referenced in function "void __cdecl sf::priv::sleepImpl(class sf::Time)" (?sleepImpl@priv@sf@@YAXVTime@2@@Z)
1>sfml-system-s-d.lib(SleepImpl.obj) : error LNK2019: unresolved external symbol __imp_timeBeginPeriod referenced in function "void __cdecl sf::priv::sleepImpl(class sf::Time)" (?sleepImpl@priv@sf@@YAXVTime@2@@Z)
1>sfml-system-s-d.lib(SleepImpl.obj) : error LNK2019: unresolved external symbol __imp_timeEndPeriod referenced in function "void __cdecl sf::priv::sleepImpl(class sf::Time)" (?sleepImpl@priv@sf@@YAXVTime@2@@Z)
1>C:\Users\tri99er\source\repos\SFMLGame\x64\Debug\SFMLGame.exe : fatal error LNK1120: 26 unresolved externals

I'm on the verge of giving up altogether...

3
General / Re: Strange compiler errors in imgui-SFML.cpp code
« on: September 17, 2024, 08:59:51 am »
I am linking them with -s suffix.

4
General / Re: Strange compiler errors in imgui-SFML.cpp code
« on: September 16, 2024, 01:57:37 pm »
Defined already, not working.

5
General / Re: Strange compiler errors in imgui-SFML.cpp code
« on: September 16, 2024, 01:12:14 pm »
Thank you, that solved it. I just took the last release version instead of the last commit to the branch. That former one is outdated by a few months.

Now I'm still getting one error, this time it's a linker one:
Quote
1>main.obj : error LNK2001: unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B)
1>C:\Users\tri99er\source\repos\SFMLGame\x64\Debug\SFMLGame.exe : fatal error LNK1120: 1 unresolved externals

6
General / Re: Strange compiler errors in imgui-SFML.cpp code
« on: September 15, 2024, 12:32:20 pm »
Here's the relevant part:
Quote
1>imgui-SFML.cpp
1>C:\Users\tri99er\source\repos\SFMLGame\imgui\imgui-SFML.cpp(1024,19): error C2665: 'ImGui::ImageButton': no overloaded function could convert all the argument types
1>    C:\Users\tri99er\source\repos\SFMLGame\imgui\imgui.h(565,29):
1>    could be 'bool ImGui::ImageButton(const char *,ImTextureID,const ImVec2 &,const ImVec2 &,const ImVec2 &,const ImVec4 &,const ImVec4 &)'
1>        C:\Users\tri99er\source\repos\SFMLGame\imgui\imgui-SFML.cpp(1024,19):
1>        '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 *'
1>            C:\Users\tri99er\source\repos\SFMLGame\imgui\imgui-SFML.cpp(1024,31):
1>            Conversion from 'void*' to pointer to non-'void' requires an explicit cast
1>    C:\Users\tri99er\source\repos\SFMLGame\imgui\imgui-SFML.cpp(1024,19):
1>    while trying to match the argument list '(ImTextureID, ImVec2, ImVec2, ImVec2, const int, ImColor, ImColor)'
1>C:\Users\tri99er\source\repos\SFMLGame\imgui\imgui-SFML.cpp(1041,19): error C2665: 'ImGui::ImageButton': no overloaded function could convert all the argument types
1>    C:\Users\tri99er\source\repos\SFMLGame\imgui\imgui.h(565,29):
1>    could be 'bool ImGui::ImageButton(const char *,ImTextureID,const ImVec2 &,const ImVec2 &,const ImVec2 &,const ImVec4 &,const ImVec4 &)'
1>        C:\Users\tri99er\source\repos\SFMLGame\imgui\imgui-SFML.cpp(1041,19):
1>        '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 *'
1>            C:\Users\tri99er\source\repos\SFMLGame\imgui\imgui-SFML.cpp(1041,31):
1>            Conversion from 'void*' to pointer to non-'void' requires an explicit cast
1>    C:\Users\tri99er\source\repos\SFMLGame\imgui\imgui-SFML.cpp(1041,19):
1>    while trying to match the argument list '(ImTextureID, ImVec2, ImVec2, ImVec2, const int, ImColor, ImColor)'
1>C:\Users\tri99er\source\repos\SFMLGame\imgui\imgui-SFML.cpp(1075,19): error C2665: 'ImGui::ImageButton': no overloaded function could convert all the argument types
1>    C:\Users\tri99er\source\repos\SFMLGame\imgui\imgui.h(565,29):
1>    could be 'bool ImGui::ImageButton(const char *,ImTextureID,const ImVec2 &,const ImVec2 &,const ImVec2 &,const ImVec4 &,const ImVec4 &)'
1>        C:\Users\tri99er\source\repos\SFMLGame\imgui\imgui-SFML.cpp(1075,19):
1>        '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 *'
1>            C:\Users\tri99er\source\repos\SFMLGame\imgui\imgui-SFML.cpp(1075,31):
1>            Conversion from 'void*' to pointer to non-'void' requires an explicit cast
1>    C:\Users\tri99er\source\repos\SFMLGame\imgui\imgui-SFML.cpp(1075,19):
1>    while trying to match the argument list '(ImTextureID, ImVec2, ImVec2, ImVec2, const int, ImColor, ImColor)'

I appreciate you guiding me through this step by step.

7
General / Re: Strange compiler errors in imgui-SFML.cpp code
« on: September 15, 2024, 08:40:09 am »
I've updated to SFML 2.6.1 and it still produced the same errors.

8
General / Re: Strange compiler errors in imgui-SFML.cpp code
« on: September 15, 2024, 08:37:12 am »
Then it shouldn't say "SFML >= 2.5.0" on the https://github.com/SFML/imgui-sfml/tree/2.6.x page.

9
General / Re: Strange compiler errors in imgui-SFML.cpp code
« on: September 14, 2024, 04:29:39 pm »
I suspect, I did something wrong at setting it up, but I redid it a few times from start following the instructions and it still doesn't work.

10
General / Re: Strange compiler errors in imgui-SFML.cpp code
« on: September 14, 2024, 04:07:29 pm »
I don't call ImGui::ImageButton at all:

#include <iostream>
#include <memory>
#include <fstream>

#include <SFML/Graphics.hpp>
#include "imgui.h"
#include "imgui-SFML.h"

int main(int argc, char* argv[]) {
        const int wWidth = 1280;
        const int wHeight = 720;

        sf::RenderWindow window(sf::VideoMode(wWidth, wHeight), "SFML works!");
        window.setFramerateLimit(60);

        ImGui::SFML::Init(window);
        sf::Clock deltaClock;

        ImGui::GetStyle().ScaleAllSizes(1.0f);

        float c[3] = { 0.0f, 1.0f, 1.0f };

        float circleRadius = 50;
        int circleSegments = 32;
        float circleSpeedX = 1.0f;
        float circleSpeedY = 0.5f;
        bool drawCircle = true;
        bool drawText = true;

        sf::CircleShape circle(circleRadius, circleSegments);
        circle.setPosition(10.0f, 10.0f);

        sf::Font myFont;

        if (!myFont.loadFromFile("fonts/tech.ttf")) {
                std::cerr << "Could not load font!\n";
                exit(-1);
        }

        sf::Text text("Sample Text", myFont, 24);

        text.setPosition(0, wHeight - (float)text.getCharacterSize());

        char displayString[255] = "Sample Text";

        while (window.isOpen()) {
                sf::Event event;
                while (window.pollEvent(event)) {
                        ImGui::SFML::ProcessEvent(window, event);

                        if (event.type == sf::Event::Closed) {
                                window.close();
                        }

                        if (event.type == sf::Event::KeyPressed) {
                                std::cout << "Key pressed with code = " << event.key.code << std::endl;

                                if (event.key.code == sf::Keyboard::X) {
                                        circleSpeedX *= -1.0f;
                                }
                        }

                        ImGui::SFML::Update(window, deltaClock.restart());

                        ImGui::Begin("Window title");
                        ImGui::Text("Window text!");
                        ImGui::Checkbox("Draw Circle", &drawCircle);
                        ImGui::SameLine();
                        ImGui::Checkbox("Draw Text", &drawText);
                        ImGui::SliderFloat("Radius", &circleRadius, 0.0f, 300.0f);
                        ImGui::SliderInt("Sides", &circleSegments, 3, 64);
                        ImGui::ColorEdit3("Color Circle", c);
                        ImGui::InputText("Text", displayString, 255);
                        if (ImGui::Button("Set Text")) {
                                text.setString(displayString);
                        }
                        ImGui::SameLine();
                        if (ImGui::Button("Reset Circle")) {
                                circle.setPosition(0, 0);
                        }
                        ImGui::End();

                        circle.setFillColor(sf::Color(c[0] * 255, c[1] * 255, c[2] * 255));
                        circle.setPointCount(circleSegments);
                        circle.setRadius(circleRadius);

                        circle.setPosition(circle.getPosition().x + circleSpeedX, circle.getPosition().y + circleSpeedY);

                        window.clear();
                        if (drawCircle) {
                                window.draw(circle);
                        }
                        if (drawText) {
                                window.draw(text);
                        }
                        ImGui::SFML::Render(window);
                        window.display();
                }
        }

        return 0;
}
 

11
General / [Solved] Strange compiler errors in imgui-SFML.cpp code
« on: September 14, 2024, 12:23:07 pm »
Hi, I have this issue with Imgui-SFML library set up in Visual Studio. For some reason, when I try to build it, I get compiler errors in library code (imgui-SFML.cpp file):

Severity        Code    Description     Project File    Line    Suppression State       Details
Error   C2665   &#39;ImGui::ImageButton&#39;: no overloaded function could convert all the argument types       SFMLGame        C:\Users\tri99er\source\repos\SFMLGame\imgui\imgui-SFML.cpp     1024   

Severity        Code    Description     Project File    Line    Suppression State       Details
Error   C2665   &#39;ImGui::ImageButton&#39;: no overloaded function could convert all the argument types       SFMLGame        C:\Users\tri99er\source\repos\SFMLGame\imgui\imgui-SFML.cpp     1041

Severity        Code    Description     Project File    Line    Suppression State       Details
Error   C2665   &#39;ImGui::ImageButton&#39;: no overloaded function could convert all the argument types       SFMLGame        C:\Users\tri99er\source\repos\SFMLGame\imgui\imgui-SFML.cpp     1075

I use Visual Studio 2022.

Versions:
SFML: 2.5.1
ImGui: 1.91.1
ImGui-SFML: 2.6

Pages: [1]