Linking from ImGuiBundle - ImFontAtlas Linking Problem #230
algotron
started this conversation in
Development Corner
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Linking from ImGuiBundle - ImFontAtlas Linking Problem:
Date: 2024-06-25
How can I link to ImFontAtlas::AddFontFromFileTTF?
What ".a" file am I missing?
Description:
I downloaded the ImGuiBundle and created the demo XCode App (worked well).I now want to use the
ImGuiBundle build as a basis for my own build, referencing the bundles resources. I cannot
get past the problem that
ImFontAtlas::AddFontFromFileTTF
is not found. The error is:
Undefined symbols for architecture arm64:
"ImFontAtlas::AddFontFromFileTTF(char const*, float, ImFontConfig const*, unsigned short const*)", referenced from:
Install_ImGuiFonts(std::__1::list<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator>>>&) in CustomImGuiTools.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Details:
Code Snippet that calls AddFontFromFileTTF
// install fonts:
// ocornut/imgui#5771
// ImFontAtlas* _cpfont_atlas = io.Fonts;
// declared in imgui_draw.cpp
The header search paths are:
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/external/immapp
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/external/hello_imgui/hello_imgui/src
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/bindings/imgui_bundle/demos_cpp
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/external/imgui_md
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/external/hello_imgui/hello_imgui/external/imgui
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/external/imgui-node-editor
/Users/pw/Work/Dev/ImGuiBundleXCode/external/freetype/include
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/build/_deps/lunasvg-src/include
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/external/imgui_test_engine/imgui_test_engine/imgui_test_engine
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/external/ImFileDialog
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/external/implot/implot
/Users/pw/Work/Dev/ImGui-Addons-master/FileBrowser
/Users/pw/Work/Dev/ClonedRepositories/freetype/devel
/Users/pw/Work/Dev/ClonedRepositories/freetype/include
The library search paths are:
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/external
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/build/external/hello_imgui/hello_imgui/src/hello_imgui
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/build/imcoolbar.build/Release/Objects-normal/arm64
The other linker flags are:
-Wl,-search_paths_first
-Wl,-headerpad_max_install_names
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/hello_imgui/hello_imgui/src/hello_imgui/Debug/libhello_imgui.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/bindings/imgui_bundle/demos_cpp/demo_utils/Debug/libdemo_utils.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/bindings/imgui_bundle/demos_cpp/Debug/libdemos_cpp.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/bindings/imgui_bundle/demos_cpp/demos_imguizmo/Debug/libdemos_imguizmo.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/bindings/imgui_bundle/demos_cpp/demos_tex_inspect/Debug/libdemos_tex_inspect.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/bindings/imgui_bundle/demos_cpp/demos_node_editor/Debug/libdemos_node_editor.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/bindings/imgui_bundle/demos_cpp/demo_utils/Debug/libdemo_utils.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/Debug/libimgui_node_editor.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/Debug/libimgui_md.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/immapp/immapp/Debug/libimmapp.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/Debug/libimgui_node_editor.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/Debug/libimgui_md.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/immapp/immapp/Debug/libimmapp.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/Debug/libimguizmo.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/Debug/libimgui_tex_inspect.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/Debug/libnvg_imgui.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/nanovg/nanovg/Debug/libnanovg.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/Debug/libimgui_knobs.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/Debug/libimspinner.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/Debug/libimgui_toggle.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/Debug/libimgui_command_palette.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/Debug/libimcoolbar.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/ImGuiColorTextEdit/Debug/libimgui_color_text_edit.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/Debug/libimplot.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/Debug/libim_file_dialog.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/hello_imgui/hello_imgui/src/hello_imgui/Debug/libhello_imgui.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/hello_imgui/hello_imgui/src/hello_imgui/Debug/libstb_hello_imgui.a
/opt/homebrew/Cellar/sdl2/2.30.2/lib/libSDL2.dylib
/opt/homebrew/Cellar/sdl2/2.30.2/lib/libSDL2main.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/Debug/libimgui.a
/opt/homebrew/lib/libfreetype.dylib
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/hello_imgui/hello_imgui/src/hello_imgui/Debug/libimgui_test_engine.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/_deps/lunasvg-build/Debug/liblunasvg.a
/Users/pw/Work/Dev/ImGuiBundleXCode/external/imgui_bundle/XCodeProject/external/hello_imgui/hello_imgui/src/hello_imgui/Debug/libglad.a
Beta Was this translation helpful? Give feedback.
All reactions