views:

224

answers:

0

I am writing a C program using graphviz. But I am not able to link graphviz as library. I have tried several approaches. When I do

#include "gvc.h"

and include all .lib,.dll and *.h files in my working directory, gcc gives this linker error:

/cygdrive/c/Users/aditya/AppData/Local/Temp/ccMRaUr9.o:a.c:(.text+0x2b): undefined reference to `_gvContext'
/cygdrive/c/Users/aditya/AppData/Local/Temp/ccMRaUr9.o:a.c:(.text+0x47): undefined

I have tried the the other approach also. In the path variable, I have included these two paths

C:\Program Files\Graphviz2.24\bin  //for .dll files
C:\Program Files\Graphviz2.24\include\graphviz  //for .h files

and did

#include<gvc.h>

then it could not find gvc.h file. Someone please help me. Urgent.