diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f6ce515dfcd1e28476c6aed5d43e957b4b5bb32..60c392aaf9ba3969d8adf5d69f7d6f40ce99fba2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -312,14 +312,14 @@ endif() #message (STATUS "PSAPI: ${PSAPI}") #endif() -add_library ( geometrycore STATIC ${source_files} ) +add_library ( geometrycore SHARED ${source_files} ${methods}) set_property(TARGET geometrycore PROPERTY CXX_STANDARD 17) set_property(TARGET geometrycore PROPERTY CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) target_link_libraries(geometrycore stdc++fs) add_executable( - jpsreport main.cpp ${methods} + jpsreport main.cpp ) set_property(TARGET jpsreport PROPERTY CXX_STANDARD 17) diff --git a/methods/PedData.cpp b/methods/PedData.cpp index 08d4d47e88d3e19452bea3cd948fafdfe08d7b53..3e2e65440bcc8a74a615fac824038f63dba4f290 100644 --- a/methods/PedData.cpp +++ b/methods/PedData.cpp @@ -67,8 +67,8 @@ bool PedData::ReadData(const fs::path& projectRootDir, const fs::path&outputLoca return false; } TiXmlElement* xRootNode = docGeo.RootElement(); - fs::path filename(xRootNode->ValueStr()); - result=InitializeVariables(filename); //initialize some global variables + result=InitializeVariables(xRootNode); //initialize some global + //variables using xml format } else if(trajformat == FORMAT_PLAIN) @@ -92,7 +92,7 @@ bool PedData::InitializeVariables(const fs::path& filename) fdata.open(filename.string()); if (fdata.is_open() == false) { - Log->Write("ERROR: \t could not parse the trajectories file <%s>",filename.string().c_str()); + Log->Write("ERROR: \t could not open the trajectories file <%s>",filename.string().c_str()); return false; } else @@ -340,15 +340,15 @@ bool PedData::InitializeVariables(const fs::path& filename) return true; } -// initialize the global variables variables +// initialize the global variables. xml format bool PedData::InitializeVariables(TiXmlElement* xRootNode) { if( ! xRootNode ) { - Log->Write("ERROR:\tRoot element does not exist"); + Log->Write("ERROR:\tPedData::InitializeVariables: Root element does not exist"); return false; } if( xRootNode->ValueStr () != "trajectories" ) { - Log->Write("ERROR:\tRoot element value is not 'trajectories'."); + Log->Write("ERROR:\tPedData::InitializeVariables. Root element value is not 'trajectories'."); return false; }