Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

CMake error: Could not find a package configuration file provided by "TinyXML2" with any of the following names: TinyXML2Config.cmake tinyxml2-config.cmake

Aperta
#930 22 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

I am trying to build a CMake package which requires tinyxml2, but am unable to get it to work. Error:

CMake Error at CMakeLists.txt:9 (find_package):
  By not providing "FindTinyXML2.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "TinyXML2",
  but CMake did not find one.

  Could not find a package configuration file provided by "TinyXML2" with any
  of the following names:

    TinyXML2Config.cmake
    tinyxml2-config.cmake

  Add the installation prefix of "TinyXML2" to CMAKE_PREFIX_PATH or set
  "TinyXML2_DIR" to a directory containing one of the above files.  If
  "TinyXML2" provides a separate development package or SDK, be sure it has
  been installed.

The package I am building is host-rospack, built via Buildroot.

I have tried installing TinyXML2 in 3 ways, none of which work to make Cmake find it!:

  1. Via apt on ubuntu 22.04:
    sudo apt update
    sudo apt install libtinyxml2-dev
    sudo apt install libtinyxml-dev
    
  2. Via make
    git clone https://github.com/leethomason/tinyxml2.git
    cd tinyxml2/
    make
    sudo make install
    
  3. Via vcpkg, as described here:
    git clone https://github.com/Microsoft/vcpkg.git
    cd vcpkg
    ./bootstrap-vcpkg.sh
    ./vcpkg integrate install
    ./vcpkg install tinyxml2
    

How do I install tinyxml2 in such a way that my CMake package which requires it (rospack in my case) can find it?

Lingua principale
C++
Stelle
5.8k
Fork
2k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di leethomason/tinyxml2

Tutte le issue di leethomason/tinyxml2

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.