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

Author Topic: ImGui + SFML  (Read 2265 times)

0 Members and 1 Guest are viewing this topic.

Nullcoss

  • Newbie
  • *
  • Posts: 2
    • View Profile
ImGui + SFML
« on: April 26, 2019, 02:29:15 am »
So, I don't know how to intro this post, so here's my issue:
I was trying to get imgui to work with SFML using https://github.com/eliasdaler/imgui-sfml, but came across a bunch of errors that I had no idea how to get rid of

Code: [Select]
unresolved external symbol "bool __cdecl ImGui::Begin(char const *,bool *,int)" (?Begin@ImGui@@YA_NPEBDPEA_NH@Z) referenced in function main
unresolved external symbol "void __cdecl ImGui::End(void)" (?End@ImGui@@YAXXZ) referenced in function main
unresolved external symbol "bool __cdecl ImGui::Button(char const *,struct ImVec2 const &)" (?Button@ImGui@@YA_NPEBDAEBUImVec2@@@Z) referenced in function main
unresolved external symbol "void __cdecl ImGui::SFML::Init(class sf::RenderWindow &,bool)" (?Init@SFML@ImGui@@YAXAEAVRenderWindow@sf@@_N@Z) referenced in function main
unresolved external symbol "void __cdecl ImGui::SFML::ProcessEvent(class sf::Event const &)" (?ProcessEvent@SFML@ImGui@@YAXAEBVEvent@sf@@@Z) referenced in function main
unresolved external symbol "void __cdecl ImGui::SFML::Update(class sf::RenderWindow &,class sf::Time)" (?Update@SFML@ImGui@@YAXAEAVRenderWindow@sf@@VTime@4@@Z) referenced in function main
unresolved external symbol "void __cdecl ImGui::SFML::Render(class sf::RenderTarget &)" (?Render@SFML@ImGui@@YAXAEAVRenderTarget@sf@@@Z) referenced in function main
unresolved external symbol "void __cdecl ImGui::SFML::Shutdown(void)" (?Shutdown@SFML@ImGui@@YAXXZ) referenced in function main

No errors show up in the code view, so I don't know why I'm getting them.
I've tried the same solution offered in a post with my same issue here https://en.sfml-dev.org/forums/index.php?topic=21684.0
which was to add "opengl32.lib" to the linker, and also install Windows Universal CRT SDK
But the solution given doesn't work for me. I installed Windows Universal CRT SDK and added opengl32.lib to my linker. I am very new to programming and C++ so it could be something stupid with opengl that I did, but I truly honestly have no idea. I didn't install anything related to OpenGL, so is that the issue? (Sorry if that sounds dumb)
And if it is, how do I get it? Thanks for reading
« Last Edit: April 26, 2019, 09:45:34 pm by Nullcoss »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: ImGui + SFML
« Reply #1 on: April 26, 2019, 08:25:19 am »
Quote
same issue as this post: https://en.sfml-dev.org/forums/index.php?topic=21684.0
Can you write a summary of your problem here, so that we don't have to read all that topic? Thanks ;)
Laurent Gomila - SFML developer

Nullcoss

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: ImGui + SFML
« Reply #2 on: April 26, 2019, 09:45:59 pm »
Quote
same issue as this post: https://en.sfml-dev.org/forums/index.php?topic=21684.0
Can you write a summary of your problem here, so that we don't have to read all that topic? Thanks ;)

I've added the errors I'm getting, what I'm using, and also added the solution offered in the topic, is that good?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: ImGui + SFML
« Reply #3 on: April 27, 2019, 12:17:02 pm »
Did you add the SFML-Imgui files to your project directly, or did you compile it separately and link it to your project? Whatever you did, you certainly did it wrong since the linker cannot find the SFML-Imgui functions. And this has nothing to do with OpenGL.
Laurent Gomila - SFML developer

 

anything