Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImGui::ShowFontAtlas is not exported #4171

Closed
eliasdaler opened this issue May 24, 2021 · 6 comments
Closed

ImGui::ShowFontAtlas is not exported #4171

eliasdaler opened this issue May 24, 2021 · 6 comments

Comments

@eliasdaler
Copy link
Contributor

Version: 1.83
Branch: master
Back-ends: ImGui-SFML
Compiler: MSVC 14
OS: Windows 10


After c708299 I got the following linking problem:

imgui.cpp.obj : error LNK2019: unresolved external symbol "void __cdecl ImGui::ShowFontAtlas(struct ImFontAtlas *)" (?ShowFontAtlas@ImGui@@YAXPEAUImFontAtlas@@@Z) referenced in function "void __cdecl ImGui::ShowMetricsWindow(bool *)" (?ShowMetricsWindow@ImGui@@YAXPEA_N@Z)

My understanding is that ShowFontAtlas is not exported, but gets called in ShowMetricsWindow and doesn't get inlined, that's why we get a linking error.

I guess that IMGUI_API should get added to it or it should be a static function which will only be used in imgui.cpp.

@ocornut
Copy link
Owner

ocornut commented May 25, 2021 via email

@ocornut
Copy link
Owner

ocornut commented May 25, 2021

Or, it could be that you are not linking with imgui_demo at all, i’d be interested to know if that’s the case.

@PathogenDavid
Copy link
Contributor

Or, it could be that you are not linking with imgui_demo at all, i’d be interested to know if that’s the case.

That appears to be the case.

@ocornut
Copy link
Owner

ocornut commented May 25, 2021

This is not something we normally support this way, as there’s a dedicated define for it. I’d be tempted to enforce that to ensure people keep at least the source file on disk, but I understand being a new restriction it may need to be reworked.

@ocornut
Copy link
Owner

ocornut commented May 25, 2021

Pushed a fix with 3a941f9

Changelog says
"Demo: Fixed requirement in 1.83 to link with imgui_demo.cpp if IMGUI_DISABLE_METRICS_WINDOW is not set. (#4171). Normally the right way to disable compiling the demo is to set IMGUI_DISABLE_DEMO_WINDOWS, but we want to avoid implying that the file is required."

@ocornut ocornut closed this as completed May 25, 2021
@eliasdaler
Copy link
Contributor Author

eliasdaler commented May 25, 2021

Thanks, that fixed the problem. I didn't link to imgui_demo.cpp, but that shouldn't be a requirement so I'm glad it's fixed now. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants