This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

undefined symbol: xmlParseFile

0

I'm working in linux and I would need to use libxml2 functions for the development of a plugin for wireshark but when I start wireshark I get an error message: undefined symbol: xmlParseFile. I thought that the error would be resolved by including the header "xmlexports.h" but it was not so. I am writing a piece of code to facilitate the understanding:

#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
xmlDocPtr docS=NULL;
char *fileNameXML="test.xml"
docS = xmlParseFile(fileNameXML);

Thank you in advance!

asked 12 May '14, 03:01

Junzo's gravatar image

Junzo
11348
accept rate: 100%

edited 12 May '14, 09:00

grahamb's gravatar image

grahamb ♦
19.8k330206

I guess you need to change the makefile(s) to link against libxml2.

(12 May '14, 05:42) Anders ♦

I think the issue might be a runtime load problem, the OP says the problem occurs when starting Wireshark, not building.

(12 May '14, 05:53) grahamb ♦

Or maybe not.

(12 May '14, 07:27) grahamb ♦

One Answer:

0

I had forgotten to include the library lxml2 in phase of linking. I'm sorry

answered 12 May '14, 07:21

Junzo's gravatar image

Junzo
11348
accept rate: 100%

@Junzo,

No need to modify the question title to mark it as answered/solved, instead click the checkmark icon next to your answer. Please read the FAQ for more info.

(12 May '14, 09:01) grahamb ♦