Skip to content

[imgui-sfml] include failure #21530

@copyrat90

Description

@copyrat90

Host Environment

  • OS: Windows 10 / Ubuntu 20.04
  • Compiler: MSVC 19.29.30137(x64) / g++ 9.3

To Reproduce
./vcpkg install imgui-sfml

Small snippet to reproduce the linker error.

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

int main()
{
    sf::RenderWindow window(sf::VideoMode(640, 480), "Test window");
    ImGui::SFML::Init(window);
    ImGui::SFML::Shutdown();
}

(Also, manifest mode projects give the same errors.)

Failure logs

# MSVC classic mode project
1>------ Build started: Project: ConsoleApplication2, Configuration: Debug x64 ------
1>ConsoleApplication2.cpp
1>ImGui-SFML.lib(imgui-SFML.cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl ImGui::Image(unsigned int,struct ImVec2 const &,struct ImVec2 const &,struct ImVec2 const &,struct ImVec4 const &,struct ImVec4 const &)" (?Image@ImGui@@YAXIAEBUImVec2@@00AEBUImVec4@@1@Z) referenced in function "void __cdecl ImGui::Image(class sf::Texture const &,class sf::Vector2<float> const &,class sf::Color const &,class sf::Color const &)" (?Image@ImGui@@YAXAEBVTexture@sf@@AEBV?$Vector2@M@3@AEBVColor@3@2@Z)
1>ImGui-SFML.lib(imgui-SFML.cpp.obj) : error LNK2019: unresolved external symbol "bool __cdecl ImGui::ImageButton(unsigned int,struct ImVec2 const &,struct ImVec2 const &,struct ImVec2 const &,int,struct ImVec4 const &,struct ImVec4 const &)" (?ImageButton@ImGui@@YA_NIAEBUImVec2@@00HAEBUImVec4@@1@Z) referenced in function "bool __cdecl ImGui::ImageButton(class sf::Texture const &,class sf::Vector2<float> const &,int,class sf::Color const &,class sf::Color const &)" (?ImageButton@ImGui@@YA_NAEBVTexture@sf@@AEBV?$Vector2@M@3@HAEBVColor@3@2@Z)
1>C:\Users\Home\source\repos\ConsoleApplication2\x64\Debug\ConsoleApplication2.exe : fatal error LNK1120: 2 unresolved externals
1>Done building project "ConsoleApplication2.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Additional context
v2.3 port worked fine, but as soon as I updated vcpkg to use the v2.4 port, this error pops up.
Probably something is broken in the v2.4 port update(#21460)?

Metadata

Metadata

Labels

category:port-bugThe issue is with a library, which is something the port should already support

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions