diff --git a/GraphOffline.cpp b/GraphOffline.cpp index 25addd9..27cf729 100644 --- a/GraphOffline.cpp +++ b/GraphOffline.cpp @@ -83,9 +83,9 @@ extern "C" { const char* ProcessAlgorithm(const char* emscriptParams); } +std::string res; const char* ProcessAlgorithm(const char* emscriptParams) { - static std::string res; if (strcmp(emscriptParams, EMSCRIPT_DELEMITER) == 0) { res = "test"; diff --git a/makefile-emcc b/makefile-emcc index ab78bee..bae9fa6 100644 --- a/makefile-emcc +++ b/makefile-emcc @@ -17,7 +17,7 @@ GRAPH_DIR = graph OBJ_DIR = bin/emscripten/obj # Declaration of variables -CXX = EMCC_DEBUG=1 emcc +CXX = emcc CPPFLAGS += -std=c++17 -Wall -I. -I $(ALGORITHM_DIR) -I $(PUGIXML_DIR) -I $(REPORT_DIR) -I $(COMMON_DIR) -I $(GRAPH_DIR) -I $(LIB_DIR) -DEMSCRIPT LINKFLAGS += -s EXPORTED_FUNCTIONS='_ProcessAlgorithm' -s EXPORTED_RUNTIME_METHODS=ccall,cwrap