From 4db668ab178ff7c9be2ae348c086a228dd85bc00 Mon Sep 17 00:00:00 2001 From: Qianqian Fang Date: Sun, 20 Aug 2023 09:05:38 -0400 Subject: [PATCH] fix python windows build error --- src/mcx_utils.c | 4 ++-- src/mcxlab.cpp | 2 +- src/pmcx.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mcx_utils.c b/src/mcx_utils.c index 4cedfcaa..9de52469 100644 --- a/src/mcx_utils.c +++ b/src/mcx_utils.c @@ -4907,7 +4907,7 @@ int mcx_lookupindex(char* key, const char* index) { */ void mcx_version(Config* cfg) { - const char ver[] = "$Rev:: $ "MCX_VERSION; + const char ver[] = "$Rev:: $ " MCX_VERSION; int v = 0; sscanf(ver, "$Rev::%x", &v); MCX_FPRINTF(cfg->flog, "MCX Revision %x\n", v); @@ -4994,7 +4994,7 @@ void mcx_printheader(Config* cfg) { # MCX proudly developed human-readable JSON-based data formats for easy reuse,#\n\ # Please consider using JSON (https://neurojson.org/) for your research data #\n\ ###############################################################################\n\ -$Rev:: $ "MCX_VERSION" $Date:: $ by $Author:: $\n\ +$Rev:: $ " MCX_VERSION " $Date:: $ by $Author:: $\n\ ###############################################################################\n" S_RESET); } diff --git a/src/mcxlab.cpp b/src/mcxlab.cpp index 2def1ba6..912285be 100644 --- a/src/mcxlab.cpp +++ b/src/mcxlab.cpp @@ -1354,7 +1354,7 @@ extern "C" int mcx_throw_exception(const int id, const char* msg, const char* fi */ void mcxlab_usage() { - printf("MCXLAB ("MCX_VERSION")\nUsage:\n [flux,detphoton,vol,seeds,traj]=mcxlab(cfg);\n\nPlease run 'help mcxlab' for more details.\n"); + printf("MCXLAB (" MCX_VERSION ")\nUsage:\n [flux,detphoton,vol,seeds,traj]=mcxlab(cfg);\n\nPlease run 'help mcxlab' for more details.\n"); } /** diff --git a/src/pmcx.cpp b/src/pmcx.cpp index 46c88da2..cab6d197 100644 --- a/src/pmcx.cpp +++ b/src/pmcx.cpp @@ -1144,7 +1144,7 @@ int mcx_throw_exception(const int id, const char* msg, const char* filename, con void print_mcx_usage() { std::cout - << "PMCX ("MCX_VERSION")\nUsage:\n output = pmcx.run(cfg);\n\nRun 'help(pmcx.run)' for more details.\n"; + << "PMCX (" MCX_VERSION ")\nUsage:\n output = pmcx.run(cfg);\n\nRun 'help(pmcx.run)' for more details.\n"; } /** @@ -1210,7 +1210,7 @@ py::list get_GPU_info() { } PYBIND11_MODULE(_pmcx, m) { - m.doc() = "PMCX ("MCX_VERSION"): Python bindings for Monte Carlo eXtreme photon transport simulator, http://mcx.space"; + m.doc() = "PMCX (" MCX_VERSION "): Python bindings for Monte Carlo eXtreme photon transport simulator, http://mcx.space"; m.def("run", &pmcx_interface, "Runs MCX with the given config.", py::call_guard()); m.def("run", &pmcx_interface_wargs, "Runs MCX with the given config.", py::call_guard