undefined reference to fmt::*
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cmake, cpp
- Domain
- build-system
Research direction
Start with the build and install guide section “Link with your projects” and compare its CMakeLists.txt with the reported separately installed configuration. Reproduce the link using main.cpp and the declaration of jinja2::Template, then inspect how /usr/local/lib/static/libjinja2cpp.a exposes fmt::v10 symbols. Done means the documented setup links successfully without undefined fmt references.
Written by the indexing model from the issue text.
Description
I'm following build and install guide here: Link with you projects.
I'm building my test project using the second suggestion, Jinja2Cpp separately build and install it into system wide /usr/local path.
Test project's CMakeLists.txt is copy & paste from documentation(previous link).
main.cpp includes "jinja2cpp/template.h" and declares a template variable:
jinja2::Template tpl;
Liker complains(and few more but all are about fmtlib::fmt). E.g.:
/usr/bin/ld: /usr/local/lib/static/libjinja2cpp.a(template.cpp.o): in function fmt::v10::detail::error_handler::on_error(char const*)': /.../src/Jinja2Cpp/build/_deps/fmt-src/include/fmt/core.h:655:(.text._ZN3fmt3v106detail13error_handler8on_errorEPKc[_ZN3fmt3v106detail13error_handler8on_errorEPKc]+0x8): undefined reference to fmt::v10::detail::throw_format_error(char const*)'
OS: 6.12.48+deb13-amd64
compiler: gcc 14.2.0 x86_64-linux-gnu(I saw 'supported compilers' in the readme, but still)
Unchanged CMakeLists.txt build configuration with command line: /usr/bin/cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++ --no-warn-unused-cli -S /.../src/Jinja2Cpp -B /.../src/Jinja2Cpp/build -G Ninja
Any suggestion would be appreciated!
- Dominant language
- C++
- Stars
- 600
- Forks
- 114
- PR merge metrics
- No merged PRs in 30d
Getting set up
We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jinja2cpp/Jinja2Cpp
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 4/5 3-5 days Newbie friendliness 65/100
-
Difficulty 3/5 1-2 days Newbie friendliness 74/100
-
Difficulty 3/5 1-2 days Newbie friendliness 70/100
All issues in jinja2cpp/Jinja2Cpp
Similar issues
-
component: split-view platform: windows
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
zen-browser/desktop#15616 · 1 reaction ·
Maintainers usually reply within 1 day
-
area/ysql kind/bug priority/medium status/awaiting-triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yugabyte/yugabyte-db#34415 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
WayfireWM/wayfire#3148 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
backend:DirectX
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
llvm/llvm-project#227530 ·
Maintainers usually reply within 1 day