public
Created

$ brew install libxml2 $ go build

  • Download Gist
gistfile1.txt
1 2 3 4 5
$ go build
# gokogiri/xpath
error: 'xmlXPathContextSetDeadline' undeclared (first use in this function)
error: (Each undeclared identifier is reported only once
error: 'time_t' undeclared (first use in this function)
xpath.go
Go
1 2 3 4 5 6 7 8 9 10 11 12 13
package xpath
 
/*
#cgo CFLAGS: -I/usr/local/opt/libxml2/include/libxml2
#cgo LDFLAGS: -lxml2 -L/usr/local/opt/libxml2/lib
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
#include <libxml/parser.h>
 
xmlNode* fetchNode(xmlNodeSet *nodeset, int index) {
return nodeset->nodeTab[index];
}
*/

Hey. How did you solve this? I'm trying to test gokogiri and getting this same error.

Ignore me. The master branch is just completely messed. That function doesn't exist anywhere.

Strolling the same path...

So what revision did you use then?

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.