SFML/imgui-sfml

Unable to link imgui-sfml

xzripper opened this issue · 9 comments

My project tree:

📦 main
  📦imgui
      📦 include
       ┣ 📜imconfig-SFML.h
       ┣ 📜imconfig.h
       ┣ 📜imgui-SFML.cpp
       ┣ 📜imgui-SFML.h
       ┣ 📜imgui-SFML_export.h
       ┣ 📜imgui.cpp
       ┣ 📜imgui.h
       ┣ 📜imgui_demo.cpp
       ┣ 📜imgui_draw.cpp
       ┣ 📜imgui_internal.h
       ┣ 📜imgui_tables.cpp
       ┣ 📜imgui_widgets.cpp
       ┣ 📜imstb_rectpack.h
       ┣ 📜imstb_textedit.h
       ┗ 📜imstb_truetype.h

    📦SFML
     ┣ 📂bin
     ┃ ┗ 📜openal32.dll
     ┣ 📂include
     ┃ ┗ 📂SFML
     ┃ ┃ ┣ 📂Audio
     ┃ ┃ ┃ ┣ 📜AlResource.hpp
     ┃ ┃ ┃ ┣ 📜Export.hpp
     ┃ ┃ ┃ ┣ 📜InputSoundFile.hpp
     ┃ ┃ ┃ ┣ 📜Listener.hpp
     ┃ ┃ ┃ ┣ 📜Music.hpp
     ┃ ┃ ┃ ┣ 📜OutputSoundFile.hpp
     ┃ ┃ ┃ ┣ 📜Sound.hpp
     ┃ ┃ ┃ ┣ 📜SoundBuffer.hpp
     ┃ ┃ ┃ ┣ 📜SoundBufferRecorder.hpp
     ┃ ┃ ┃ ┣ 📜SoundFileFactory.hpp
     ┃ ┃ ┃ ┣ 📜SoundFileFactory.inl
     ┃ ┃ ┃ ┣ 📜SoundFileReader.hpp
     ┃ ┃ ┃ ┣ 📜SoundFileWriter.hpp
     ┃ ┃ ┃ ┣ 📜SoundRecorder.hpp
     ┃ ┃ ┃ ┣ 📜SoundSource.hpp
     ┃ ┃ ┃ ┗ 📜SoundStream.hpp
     ┃ ┃ ┣ 📂Graphics
     ┃ ┃ ┃ ┣ 📜BlendMode.hpp
     ┃ ┃ ┃ ┣ 📜CircleShape.hpp
     ┃ ┃ ┃ ┣ 📜Color.hpp
     ┃ ┃ ┃ ┣ 📜ConvexShape.hpp
     ┃ ┃ ┃ ┣ 📜Drawable.hpp
     ┃ ┃ ┃ ┣ 📜Export.hpp
     ┃ ┃ ┃ ┣ 📜Font.hpp
     ┃ ┃ ┃ ┣ 📜Glsl.hpp
     ┃ ┃ ┃ ┣ 📜Glsl.inl
     ┃ ┃ ┃ ┣ 📜Glyph.hpp
     ┃ ┃ ┃ ┣ 📜Image.hpp
     ┃ ┃ ┃ ┣ 📜PrimitiveType.hpp
     ┃ ┃ ┃ ┣ 📜Rect.hpp
     ┃ ┃ ┃ ┣ 📜Rect.inl
     ┃ ┃ ┃ ┣ 📜RectangleShape.hpp
     ┃ ┃ ┃ ┣ 📜RenderStates.hpp
     ┃ ┃ ┃ ┣ 📜RenderTarget.hpp
     ┃ ┃ ┃ ┣ 📜RenderTexture.hpp
     ┃ ┃ ┃ ┣ 📜RenderWindow.hpp
     ┃ ┃ ┃ ┣ 📜Shader.hpp
     ┃ ┃ ┃ ┣ 📜Shape.hpp
     ┃ ┃ ┃ ┣ 📜Sprite.hpp
     ┃ ┃ ┃ ┣ 📜Text.hpp
     ┃ ┃ ┃ ┣ 📜Texture.hpp
     ┃ ┃ ┃ ┣ 📜Transform.hpp
     ┃ ┃ ┃ ┣ 📜Transformable.hpp
     ┃ ┃ ┃ ┣ 📜Vertex.hpp
     ┃ ┃ ┃ ┣ 📜VertexArray.hpp
     ┃ ┃ ┃ ┣ 📜VertexBuffer.hpp
     ┃ ┃ ┃ ┗ 📜View.hpp
     ┃ ┃ ┣ 📂Network
     ┃ ┃ ┃ ┣ 📜Export.hpp
     ┃ ┃ ┃ ┣ 📜Ftp.hpp
     ┃ ┃ ┃ ┣ 📜Http.hpp
     ┃ ┃ ┃ ┣ 📜IpAddress.hpp
     ┃ ┃ ┃ ┣ 📜Packet.hpp
     ┃ ┃ ┃ ┣ 📜Socket.hpp
     ┃ ┃ ┃ ┣ 📜SocketHandle.hpp
     ┃ ┃ ┃ ┣ 📜SocketSelector.hpp
     ┃ ┃ ┃ ┣ 📜TcpListener.hpp
     ┃ ┃ ┃ ┣ 📜TcpSocket.hpp
     ┃ ┃ ┃ ┗ 📜UdpSocket.hpp
     ┃ ┃ ┣ 📂System
     ┃ ┃ ┃ ┣ 📜Clock.hpp
     ┃ ┃ ┃ ┣ 📜Err.hpp
     ┃ ┃ ┃ ┣ 📜Export.hpp
     ┃ ┃ ┃ ┣ 📜FileInputStream.hpp
     ┃ ┃ ┃ ┣ 📜InputStream.hpp
     ┃ ┃ ┃ ┣ 📜Lock.hpp
     ┃ ┃ ┃ ┣ 📜MemoryInputStream.hpp
     ┃ ┃ ┃ ┣ 📜Mutex.hpp
     ┃ ┃ ┃ ┣ 📜NativeActivity.hpp
     ┃ ┃ ┃ ┣ 📜NonCopyable.hpp
     ┃ ┃ ┃ ┣ 📜Sleep.hpp
     ┃ ┃ ┃ ┣ 📜String.hpp
     ┃ ┃ ┃ ┣ 📜String.inl
     ┃ ┃ ┃ ┣ 📜Thread.hpp
     ┃ ┃ ┃ ┣ 📜Thread.inl
     ┃ ┃ ┃ ┣ 📜ThreadLocal.hpp
     ┃ ┃ ┃ ┣ 📜ThreadLocalPtr.hpp
     ┃ ┃ ┃ ┣ 📜ThreadLocalPtr.inl
     ┃ ┃ ┃ ┣ 📜Time.hpp
     ┃ ┃ ┃ ┣ 📜Utf.hpp
     ┃ ┃ ┃ ┣ 📜Utf.inl
     ┃ ┃ ┃ ┣ 📜Vector2.hpp
     ┃ ┃ ┃ ┣ 📜Vector2.inl
     ┃ ┃ ┃ ┣ 📜Vector3.hpp
     ┃ ┃ ┃ ┗ 📜Vector3.inl
     ┃ ┃ ┣ 📂Window
     ┃ ┃ ┃ ┣ 📜Clipboard.hpp
     ┃ ┃ ┃ ┣ 📜Context.hpp
     ┃ ┃ ┃ ┣ 📜ContextSettings.hpp
     ┃ ┃ ┃ ┣ 📜Cursor.hpp
     ┃ ┃ ┃ ┣ 📜Event.hpp
     ┃ ┃ ┃ ┣ 📜Export.hpp
     ┃ ┃ ┃ ┣ 📜GlResource.hpp
     ┃ ┃ ┃ ┣ 📜Joystick.hpp
     ┃ ┃ ┃ ┣ 📜Keyboard.hpp
     ┃ ┃ ┃ ┣ 📜Mouse.hpp
     ┃ ┃ ┃ ┣ 📜Sensor.hpp
     ┃ ┃ ┃ ┣ 📜Touch.hpp
     ┃ ┃ ┃ ┣ 📜VideoMode.hpp
     ┃ ┃ ┃ ┣ 📜Vulkan.hpp
     ┃ ┃ ┃ ┣ 📜Window.hpp
     ┃ ┃ ┃ ┣ 📜WindowBase.hpp
     ┃ ┃ ┃ ┣ 📜WindowHandle.hpp
     ┃ ┃ ┃ ┗ 📜WindowStyle.hpp
     ┃ ┃ ┣ 📜Audio.hpp
     ┃ ┃ ┣ 📜Config.hpp
     ┃ ┃ ┣ 📜GpuPreference.hpp
     ┃ ┃ ┣ 📜Graphics.hpp
     ┃ ┃ ┣ 📜Main.hpp
     ┃ ┃ ┣ 📜Network.hpp
     ┃ ┃ ┣ 📜OpenGL.hpp
     ┃ ┃ ┣ 📜System.hpp
     ┃ ┃ ┗ 📜Window.hpp
     ┗ 📂lib
     ┃ ┣ 📂cmake
     ┃ ┃ ┗ 📂SFML
     ┃ ┃ ┃ ┣ 📜SFMLConfig.cmake
     ┃ ┃ ┃ ┣ 📜SFMLConfigDependencies.cmake
     ┃ ┃ ┃ ┣ 📜SFMLConfigVersion.cmake
     ┃ ┃ ┃ ┣ 📜SFMLStaticTargets-release.cmake
     ┃ ┃ ┃ ┗ 📜SFMLStaticTargets.cmake
     ┃ ┣ 📜libFLAC.a
     ┃ ┣ 📜libfreetype.a
     ┃ ┣ 📜libogg.a
     ┃ ┣ 📜libopenal32.a
     ┃ ┣ 📜libsfml-audio-s.a
     ┃ ┣ 📜libsfml-graphics-s.a
     ┃ ┣ 📜libsfml-main.a
     ┃ ┣ 📜libsfml-network-s.a
     ┃ ┣ 📜libsfml-system-s.a
     ┃ ┣ 📜libsfml-window-s.a
     ┃ ┣ 📜libvorbis.a
     ┃ ┣ 📜libvorbisenc.a
     ┃ ┗ 📜libvorbisfile.a
    
   ┃ ┗ 📜test.cpp

My run command:
g++ test.cpp -o test.exe -std=c++11 -Wall -DSFML_STATIC -I SFML\include\ -I imgui\include\ -L SFML\lib -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -lopengl32 -lwinmm -lgdi32 -lfreetype imgui\include\imgui.cpp imgui\include\imgui_widgets.cpp imgui\include\imgui_tables.cpp imgui\include\imgui-SFML.cpp

Errors i'm getting:

c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccdxT7Sg.o:imgui.cpp:(.text+0xd97): undefined reference to `ImGui::StyleColorsDark(ImGuiStyle*)'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccdxT7Sg.o:imgui.cpp:(.text+0x2631): undefined reference to `ImBezierCubicCalc(ImVec2 const&, ImVec2 const&, ImVec2 const&, ImVec2 const&, float)'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccdxT7Sg.o:imgui.cpp:(.text+0x7ae9): undefined reference to `ImDrawList::AddText(ImFont const*, float, ImVec2 const&, unsigned int, char const*, char const*, float, 
ImVec4 const*)'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccdxT7Sg.o:imgui.cpp:(.text+0x7beb): undefined reference to `ImDrawList::AddText(ImFont const*, float, ImVec2 const&, unsigned int, char const*, char const*, float, 
ImVec4 const*)'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccdxT7Sg.o:imgui.cpp:(.text+0x7e72): undefined reference to `ImDrawList::AddText(ImFont const*, float, ImVec2 const&, unsigned int, char const*, char const*, float, 
ImVec4 const*)'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccdxT7Sg.o:imgui.cpp:(.text+0x7ec8): undefined reference to `ImDrawList::AddText(ImFont const*, float, ImVec2 const&, unsigned int, char const*, char const*, float, 
ImVec4 const*)'

* AND OTHERS ERRORS LIKE THAT *

c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\cc5Zfuz8.o:imgui-SFML.cpp:(.text+0x2c2e): undefined reference to `__imp_glEnable'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\cc5Zfuz8.o:imgui-SFML.cpp:(.text+0x2c41): undefined reference to `__imp_glBlendFunc'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\cc5Zfuz8.o:imgui-SFML.cpp:(.text+0x2c4f): undefined reference to `__imp_glDisable'

* and these errors i get after these errors above *

How do I fix it and make it properly?

You need to add imgui_draw.cpp to your build.

It reduced amount of the errors, but I still getting some errors:

c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x107f): undefined reference to `sf::Touch::isDown(unsigned int)'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x109b): undefined reference to `sf::Touch::getPosition(unsigned int, sf::WindowBase const&)'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x1121): undefined reference to `sf::Mouse::getPosition(sf::WindowBase const&)'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x1233): undefined reference to `sf::Mouse::setPosition(sf::Vector2<int> const&)'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x1299): undefined reference to `sf::Touch::isDown(unsigned int)'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x12ba): undefined reference to `sf::Mouse::isButtonPressed(sf::Mouse::Button)'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x20a0): undefined reference to `sf::RenderTexture::getTexture() const'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x21a2): undefined reference to `sf::Sprite::getGlobalBounds() const'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2207): undefined reference to `sf::Sprite::getTexture() const'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2247): undefined reference to `sf::Sprite::getTextureRect() const'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2573): undefined reference to `sf::RenderTexture::getTexture() const'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x267e): undefined reference to `sf::Sprite::getGlobalBounds() const'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x26ea): undefined reference to `sf::Sprite::getTexture() const'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2730): undefined reference to `sf::Sprite::getTextureRect() const'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2c2e): undefined reference to `__imp_glEnable'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2c41): undefined reference to `__imp_glBlendFunc'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2c4f): undefined reference to `__imp_glDisable'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2c5d): undefined reference to `__imp_glDisable'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2c6b): undefined reference to `__imp_glDisable'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2c79): undefined reference to `__imp_glDisable'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2c87): undefined reference to `__imp_glDisable'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2c95): undefined reference to `__imp_glEnable'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2ca3): undefined reference to `__imp_glEnableClientState'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2cb1): undefined reference to `__imp_glEnableClientState'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2cbf): undefined reference to `__imp_glEnableClientState'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2ccd): undefined reference to `__imp_glDisableClientState'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2cdb): undefined reference to `__imp_glEnable'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2cee): undefined reference to `__imp_glPolygonMode'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2cfc): undefined reference to `__imp_glShadeModel'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2d15): undefined reference to `__imp_glTexEnvi'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2d34): undefined reference to `__imp_glViewport'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2d42): undefined reference to `__imp_glMatrixMode'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2d4b): undefined reference to `__imp_glPushMatrix'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2d54): undefined reference to `__imp_glLoadIdentity'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2de1): undefined reference to `__imp_glOrtho'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2def): undefined reference to `__imp_glMatrixMode'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2df8): undefined reference to `__imp_glPushMatrix'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2e01): undefined reference to `__imp_glLoadIdentity'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2edf): undefined reference to `__imp_glGetIntegerv'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2ef4): undefined reference to `__imp_glGetIntegerv'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2f09): undefined reference to `__imp_glGetIntegerv'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2f1e): undefined reference to `__imp_glGetIntegerv'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2f33): undefined reference to `__imp_glGetIntegerv'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2f4d): undefined reference to `__imp_glGetTexEnviv'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2f5b): undefined reference to `__imp_glPushAttrib'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x2fe7): undefined reference to `__imp_glVertexPointer'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x300b): undefined reference to `__imp_glTexCoordPointer'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x302f): undefined reference to `__imp_glColorPointer'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x3235): undefined reference to `__imp_glScissor'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x325b): undefined reference to `__imp_glBindTexture'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x328f): undefined reference to `__imp_glDrawElements'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x32c4): undefined reference to `__imp_glDisableClientState'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x32d2): undefined reference to `__imp_glDisableClientState'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x32e0): undefined reference to `__imp_glDisableClientState'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x32f3): undefined reference to `__imp_glBindTexture'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x3301): undefined reference to `__imp_glMatrixMode'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x330a): undefined reference to `__imp_glPopMatrix'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x3318): undefined reference to `__imp_glMatrixMode'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x3321): undefined reference to `__imp_glPopMatrix'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x332a): undefined reference to `__imp_glPopAttrib'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x333d): undefined reference to `__imp_glPolygonMode'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x3350): undefined reference to `__imp_glPolygonMode'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x336e): undefined reference to `__imp_glViewport'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x338c): undefined reference to `__imp_glScissor'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x339a): undefined reference to `__imp_glShadeModel'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x33b3): undefined reference to `__imp_glTexEnvi'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x3a30): undefined reference to `sf::Clipboard::setString(sf::String const&)'
c:/users/ione/gcc/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\IonE\AppData\Local\Temp\ccXZzCjV.o:imgui-SFML.cpp:(.text+0x3a7b): undefined reference to `sf::Clipboard::getString()'

Any thoughts?

Seems like SFML is not linking properly. Does SFML work without imgui-sfml?

Also try moving ImGui’s .cpp files before -o flag. I don’t know how to manually compile with gcc, so I’d really suggest using CMake, otherwise I can’t help here.

No way it's fixed the problem (moving ImGui's .cpp files before -o flag). BIGGEST THANK YOU!
Screenshot_3

Screenshot_4
By the way, is it OK?

You’re probably rendering ImGui before drawing the shape?

Yeah, also solved, thank you!