Product: Fedora https://bugzilla.redhat.com/show_bug.cgi?id=960201
--- Comment #12 from Michael Schwendt mschwendt@gmail.com ---
#include <graphviz/gvc.h>
include is correct...
Hard to say.
The graphviz pkgconfig files disagree. They add the headers search path /usr/include/graphviz, which means API users are supposed to
#include <gvc.h>
without the leading "graphviz/". The graphviz headers could also be installed in /usr/include/graphviz-2.30.1/graphviz (think multiple parallel-installed APIs of graphviz), and pkg-config --cflags would add that as a direct search path and not /usr/include/graphviz-2.30.1 instead.
None of the graphviz header files append "graphviz/",
$ grep /usr/include/graphviz/*|grep graphv $
but most of them include as "foo.h" not <foo.h>, so current dir works anyway.
That including <graphviz/foo.h> works is clear when "graphviz" is located in standard search path.
There are a couple of builds that use libcgraph successfully (perhaps some of them use pkg-config though):
# repoquery --whatrequires 'libcgraph.so.6()(64bit)'|grep -v graphviz fawkes-guis-0:0.5.0-7.fc19.x86_64 flowcanvas-0:0.7.1-10.fc19.x86_64 libgda-tools-1:5.1.2-2.fc19.x86_64 root-graf-gviz-0:5.34.07-1.fc19.x86_64
graphviz-doc cgraph.3.pdf (PDF version of "man 3 cgraph") and several of the other lib manuals contain an example that does include <graphviz/….h> whereas "man 3 cdt" e.g. does include <cdt.h>. Contradictory.
Huh? $ grep cgraph /usr/include/graphviz/types.h #include <cgraph.h> #include "cgraph.h" $ grep cgraph /usr/include/graphviz/gvpr.h #include "cgraph.h"
/usr/include/graphviz/cgraph.h:43:25: error: conflicting declaration 'typedef struct Agraph_s Agraph_t'
Yes, these are clearly defined in graphviz/types.h already, so porting from libgraph to libcgraph API may need adjustments in libyui-qt-graph.