Link graphviz to a C++ project

Dear Community,

I am trying to link Graphviz 3.0 to a C++ project (msvc2019 on windows). Everything goes fine when it is the 32-bit version. However, when I compile the same code with the 64-bit version, I cannot generate any graph, I get a white picture. I noticed the library gvplugin_gd does not exist in the 64-bit version which could be the reason? Any clue?

Many things have changed since graphviz2.38 I was using in the past and I was also wondering what is cgraph++, gvc++?

Thanks in advance for your help.

There’s a couple of relevant issues with the Windows builds:

what is cgraph++, gvc++

These are some C++ wrappers of the C API that @magjac has added to allow a more RAII style of interacting with Graphviz.

Thank you very much for your response. Is there some documentation about those wrappers? I found documents “using graphviz as a library” from 2014 and 2017. I used them to include graphviz in a c++ program and those documents are still up to date (I solved the 64 bit problem, I was just linking with the wrong library …).

gvc++ and cgraph++ are documented in comments in their C++ headers.

Those documents only cover the C API. The C++ wrappers were developed in 2021 and are somewhat experimental and may change in incompatible ways going forward. As Matthew said, the only docs are in their headers. Presumably they work under Windows, but we only test them on Ubuntu Linux in CI.

Thank you very much for the useful information. I will study the c++ wrapper under windows and come back with my findings.

1 Like