1

I`m coding in C#. I'm sending the arguments below to the function gvLayout(gvc, g, layout)

IntPtr gvc = gvContext();

// My string containing the graph
IntPtr g = agmemread(source);

string layout = "nop";

I have imported the dlls from graphviz's folder.

I get the answer:

Error: Layout type: "nop" not recognized. Use one of:

So I tried:

string layout = "dot";

And got: Error: Layout type: "dot" not recognized. Use one of:

The int return value of gvLayout(gvc, g, layout) I get is -1 (should be 0).


UPDATE:

I put all dlls and config6 file into my project. Now I get the message 4 times and then nothing happens:

"The program can't start because libglib-2.0-0.dll is missing from your computer. Try reinstalling the program to fix this problem."

The thing is that the file is already there. I tried also adding a copy of that file to the folder System32 but it didn't work either.


I've already read Why does Graphviz fail on gvLayout? and couldn't reach a solution.

Community
  • 1
  • 1
Th3B0Y
  • 884
  • 1
  • 12
  • 30

3 Answers3

0

How did you install graphviz? Are you linking against the installed version, or did you copy the dlls elsewhere? The plugin mechanism relies on a file called config6 being with the dll's in order to determine what plugins are available.

Emden
  • 336
  • 1
  • 1
  • I have also put the config6 within the project. I have added all dlls and config6 there. =( Any suggestion? – Th3B0Y Oct 30 '13 at 20:53
0

Are you sure that all of your DLL files are in the right folder? I get rid of the error when I actually copied all the files in the graphviz directory to the right debug folder....

0

Having the same problem, I solved it copying all the *.dll and the "config6" file from "C:\Program Files (x86)\Graphviz\bin" next to my executable.


I first tried to copy just needed .dll but I'd got some errors or problems with fonts or layout. I ended by copying all .dll and now all works fine.

AdriZ
  • 393
  • 3
  • 9