From 53d69ba239b24ac60f8efc45a385bebcd066bcb2 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Tue, 4 Feb 2025 15:37:58 +0900 Subject: [PATCH] Fix multiple definition of global variables that prevents linking --- CortexSuite/cortex/lda/lda-inference.c | 3 +++ CortexSuite/cortex/lda/lda-inference.h | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CortexSuite/cortex/lda/lda-inference.c b/CortexSuite/cortex/lda/lda-inference.c index d10fda38..d00b4b76 100644 --- a/CortexSuite/cortex/lda/lda-inference.c +++ b/CortexSuite/cortex/lda/lda-inference.c @@ -19,6 +19,9 @@ #include "lda-inference.h" +float VAR_CONVERGED; +int VAR_MAX_ITER; + /* * variational inference * diff --git a/CortexSuite/cortex/lda/lda-inference.h b/CortexSuite/cortex/lda/lda-inference.h index 56f08ae5..ae3cfd6e 100644 --- a/CortexSuite/cortex/lda/lda-inference.h +++ b/CortexSuite/cortex/lda/lda-inference.h @@ -7,8 +7,8 @@ #include "lda.h" #include "utils.h" -float VAR_CONVERGED; -int VAR_MAX_ITER; +extern float VAR_CONVERGED; +extern int VAR_MAX_ITER; double lda_inference(document*, lda_model*, double*, double**); double compute_likelihood(document*, lda_model*, double**, double*);