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

Author Topic: [Solved] Strange compiler errors in imgui-SFML.cpp code  (Read 5227 times)

0 Members and 3 Guests are viewing this topic.

TRI99ER

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Strange compiler errors in imgui-SFML.cpp code
« Reply #15 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...

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Strange compiler errors in imgui-SFML.cpp code
« Reply #16 on: September 17, 2024, 01:50:07 pm »
Since you link SFML statically, you also have to link all of SFML's dependencies.
See the official tutorial for more info.

You could also use the imgui-sfml branch of the SFML CMake template.

Learning how to use the tools is part of learning how to program. It's normal and expected to take some time.
It can help to do things one step at a time, e.g. just learning how to use SFML first and then think about adding ImGui, or even one step back, learning how libraries work in general and work your way up from there. :)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

TRI99ER

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Strange compiler errors in imgui-SFML.cpp code
« Reply #17 on: September 18, 2024, 09:21:59 am »
Thank you, that was it. It solved the compiler and linker errors.
« Last Edit: September 18, 2024, 09:28:09 am by TRI99ER »