2

I've just installed the OGDF library for graph visualization using the guide here. I built, compiled, and linked the library to a small VisualStudio project, however when I attempt to instantiate a Graph, VisualStudio breaks with the error: "Run-Time Check Failure #2 - Stack around the variable 'G' was corrupted."

Has anybody encountered this issue before, or could anybody point me in the right direction regarding debugging problems like these?

The code that generates this issue is redundant, but I'll add it for good measure:

#include "stdafx.h"
#include <ogdf/basic/Graph.h>

using namespace ogdf;

int main()
{
    Graph G;
    return 0;
}

Thanks!

Chris Abbott
  • 316
  • 3
  • 9
  • 2
    Just about everybody encountered it, the point of the /RTC debugging feature. You'll have to rebuild the library so both your program and the library agrees how big the Graph object needs to be. You are not running a VM here, this is C++. – Hans Passant Mar 17 '16 at 22:51
  • @HansPassant: I too had this problem, since I just run cmake .. after snapshot download. I 'fixed' it adding `DEFINES += NDEBUG` in my qmake project, but the proper way to fix is not so clear. If you have one, I'd love to know your answer. Thanks – CapelliC Apr 15 '16 at 14:18

0 Answers0