ich möchte mit C++ Pugixml benutzen unter Debian Testing.
Installiert ist:
Code: Alles auswählen
dpkg -l | grep pugi
ii libpugixml-dev:amd64 1.11.4-1 amd64 Light-weight C++ XML processing library (development)
ii libpugixml1v5:amd64 1.11.4-1 amd64 Light-weight C++ XML processing library
ii pugixml-doc 1.11.4-1 all Light-weight C++ XML processing library (documentation)
https://linuxhint.com/parse_xml_in_cpp/
mit Example-2: Parse XML in C++ using PugiXML.
Code: Alles auswählen
#include <iostream>
#include "pugixml.hpp"
using namespace std;
using namespace pugi;
Code: Alles auswählen
locate pugixml.hpp
/usr/include/pugixml.hpp
Das Linken mit
Code: Alles auswählen
g++ -o pugi.bin pugi.o
Code: Alles auswählen
/usr/bin/ld: pugi.o: in function `main':
pugi.cpp:(.text+0x30): undefined reference to `pugi::xml_document::xml_document()'
/usr/bin/ld: pugi.cpp:(.text+0x55): undefined reference to `pugi::xml_document::load_file(char const*, unsigned int, pugi::xml_encoding)'
/usr/bin/ld: pugi.cpp:(.text+0x61): undefined reference to `pugi::xml_parse_result::operator bool() const'
/usr/bin/ld: pugi.cpp:(.text+0x8b): undefined reference to `pugi::xml_node::child(char const*) const'
/usr/bin/ld: pugi.cpp:(.text+0xa5): undefined reference to `pugi::xml_node::child(char const*) const'
.....
Danke!
Gruß
Rawbit