Unable to use dot layout (graphviz as a library)

后端 未结 4 1178
一向
一向 2021-01-13 18:01

I use graphviz (v2.28.0) as a library in a C++ application and I would like to render graphs using the dot layout. Everything works fine until I call the gvLayout(_c

4条回答
  •  忘掉有多难
    2021-01-13 18:30

    You probably either already fixed this or gave up, but I ended up here so I'm sure someone else will...

    Plugins need to be loaded explicitly. I'm not sure whether this is related to static linking or needs to be done whenever graphviz is used as a library.

    This fixed dot for me:

    extern gvplugin_library_t gvplugin_dot_layout_LTX_library;
    gvAddLibrary(gvc, &gvplugin_dot_layout_LTX_library);
    

提交回复
热议问题