Issues Encountered While Testing Example Code in libguide.pdf

Copying directly from the pdf is inconvenient.

demo.c:13:5: error: too few arguments to function ‘agopen’
g = agopen(“g”, Agdirected);

There are two parameters for agopen in the pdf, but it needs to be supplemented to three parameters.

Directly using the makefile causes issues:

simple: simple.o
dot: dot.o
demo: demo.o

undefined reference to `gvContext’

My fix:

simple: simple.o
$(CC) simple.o $(LDFLAGS) $(CFLAGS) -o simple
dot: dot.o
$(CC) dot.o $(LDFLAGS) $(CFLAGS) -o dot
demo: demo.o
$(CC) demo.o $(LDFLAGS) $(CFLAGS) -o demo

Later, I found Library Usage | Graphviz , but the link Files · main · graphviz / graphviz · GitLab does not lead to an actual file.

Whoops, yes a bug in the documentation. I have created an Issue here.

Note that there are some correct agopen references within the same document.

Here is the Issue for the broken Makefile link on page Library Usage | Graphviz