Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

479
Visualizações
How do you use C++ fmt on CentOS9?

I installed fmt using dnf install fmt. It was successful. But when I try to use it as #include <fmt/format.h> it says it is not found. I downloaded include from fmt git page so it finds format.h now with -I... but I have compilation errors.

undefined reference to `fmt::v8::vformat[abi:cxx11](fmt::v8::basic_string_view<char>, fmt::v8::basic_format_args<fmt::v8::basic_format_context<fmt::v8::appender, char> >)'
collect2: error: ld returned 1 exit status

I tried -lfmt but it errors with

/usr/bin/ld: cannot find -lfmt

I cant find any help for this type of use on the git.

How do you use fmt lib on CentOS9 without building fmt project manually?

EIDT: dnf install output enter image description here

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Fedora/RHEL/CentOS uses the following naming convention for all packages that installed shared libraries:

name - this package contains runtime shared libraries that are needed to run programs that are linked with this library.

name-devel - the "devel" packages contains header files and the symbolic links that allow you to link with the shared library when developing applications that use this library.

You need both packages to compile the code that uses the library. The devel package specifies a dependency on the main package, so dnf install name-devel is going to install both packages.

You should invest a little bit of time to learn how to build your own rpm packages. It's not that complicated. When you build your package rpmbuild will take care of analyzing the resulting binary, discovering which shared libraries it links with, then recording the appropriate dependency in your own rpm package, so installing it will pull in only the main name package.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda