Number: 2065
Title: Problem about the "agread" function in graphviz
Submitter: Jinbo
Date: Tue Oct 26 00:46:11 2010
Subsys: Lib(c)graph
Version: 2.26.3
System: x86-Windows-xp
Severity: critical
Problem:
I try to use the graphviz as library with vs 2008

I use the include files and libs of debug version created by installing graphviz-2.26.3.msi

However, when I placed the program--simple.c (in the libguid) in the vs 2008, although the build is successful, when I run the program, it crashed at function "agread ": g = agread(fp);

I have also tried to build the source file of graphviz by vs 2008, however, there are many building errors.
Input:

#include <gvc.h>

int main(int argc, char **argv)
{
	GVC_t *gvc;
	graph_t *g;
	FILE *fp;
	gvc = gvContext();
	if (argc > 1)
		fp = fopen(argv[1], "r");
	else
		fp = stdin;
	g = agread(fp);
	gvLayout(gvc, g, "dot");
	gvRender(gvc, g, "plain", stdout);
	gvFreeLayout(gvc, g);
	agclose(g);
	return (gvFreeContext(gvc));
}
Owner: arif
Status: *