Hi, I have been using OGDF as a library in Visual Studio 2015, and everything worked until I started using the UpwardPlanarizationLayout class.
Using this class results in linker errors (LNK 2019), while, confusingly, similar classes (such as SugiyamaLayout) do not. Here is the modified example code I have been working with, which just attempts to draw an upward planar representation of a random graph:
#include <ogdf/basic/Graph.h>
#include <ogdf/basic/graph_generators.h>
#include <ogdf/layered/DfsAcyclicSubgraph.h>
#include <ogdf/fileformats/GraphIO.h>
#include <ogdf/upward/UpwardPlanarity.h>
#include <ogdf/basic/GraphAttributes.h>
#include <ogdf/upward/UpwardPlanarizationLayout.h>
#include <ogdf/layered/SugiyamaLayout.h>
using namespace ogdf;
int main()
{
srand((unsigned int)time(NULL));
Graph G;
randomSimpleGraph(G, 10, 20);
DfsAcyclicSubgraph DAS;
DAS.callAndReverse(G);
GraphIO::writeGML(G, "exgraph.gml");
bool upward = UpwardPlanarity::isUpwardPlanar_embedded(G);
// attempt to draw an upward planar representation
GraphAttributes GA(G, GraphAttributes::nodeGraphics | GraphAttributes::edgeGraphics);
SugiyamaLayout SL = SugiyamaLayout(); //no compilation errors
UpwardPlanarizationLayout UPL = UpwardPlanarizationLayout(); //compilation errors (LNK 2019)
UPL.call(GA);
GraphIO::drawSVG(GA, "exampleGraph.svg");
return 0;
}
Thank you to anyone who can help.