From 11540551b398d4fe242cbad2031b03dee73e2af0 Mon Sep 17 00:00:00 2001 From: John Ellson Date: Mon, 6 Apr 2020 11:01:32 -0400 Subject: [PATCH] add '#ifdef __cplusplus' wrapper to sgd.h to try to fix windows build error --- lib/neatogen/sgd.c | 1 + lib/neatogen/sgd.h | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/neatogen/sgd.c b/lib/neatogen/sgd.c index 941ba6b7c..4d809c56b 100644 --- a/lib/neatogen/sgd.c +++ b/lib/neatogen/sgd.c @@ -1,3 +1,4 @@ +#include "neato.h" #include "sgd.h" #include "dijkstra.h" #include "randomkit.h" diff --git a/lib/neatogen/sgd.h b/lib/neatogen/sgd.h index 9b2b12f07..fcad8d091 100644 --- a/lib/neatogen/sgd.h +++ b/lib/neatogen/sgd.h @@ -1,8 +1,10 @@ +#ifdef __cplusplus +extern "C" { +#endif + #ifndef SGD_H #define SGD_H -#include "neato.h" - typedef struct term_sgd { int i, j; float d, w; @@ -20,3 +22,7 @@ typedef struct graph_sgd { extern void sgd(graph_t *, int); #endif /* SGD_H */ + +#ifdef __cplusplus +} +#endif -- 2.40.0