我正在用 C# 编码。我将以下参数发送给函数 gvLayout(gvc, g, layout)
IntPtr gvc = gvContext();
// My string containing the graph
IntPtr g = agmemread(source);
string layout = "nop";
我已经从 graphviz 的文件夹中导入了 dll。
我得到答案:
Error: Layout type: "nop" not recognized. Use one of:
所以我尝试了:
string layout = "dot";
并得到:错误:布局类型:“点”无法识别。使用以下之一:
我得到的 gvLayout(gvc, g, layout) 的 int 返回值为 -1(应该是 0)。
更新:
我将所有 dll 和 config6 文件放入我的项目中。现在我收到了 4 次消息,然后什么也没发生:
“程序无法启动,因为您的计算机缺少 libglib-2.0-0.dll。请尝试重新安装程序以解决此问题。”
问题是该文件已经存在。我还尝试将该文件的副本添加到文件夹 System32 中,但它也不起作用。
我已经阅读了为什么 Graphviz 在 gvLayout 上失败?并且无法达成解决方案。