Skip to content
This repository was archived by the owner on Mar 1, 2025. It is now read-only.

Commit 2e3659c

Browse files
Fix compilation under gcc7.5 (#81)
* Correct typo in individual license file name * Fix compilation under GCC 7.5 for Ubuntu
1 parent 9e44ac5 commit 2e3659c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

OndselSolver/ASMTAssembly.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@
6262
#include "ASMTRotationLimit.h"
6363
#include "ASMTTranslationLimit.h"
6464
#include "ExternalSystem.h"
65+
#if __GNUC__ >= 8
6566
#include <filesystem>
67+
#endif
6668

6769
using namespace MbD;
6870

@@ -359,8 +361,11 @@ void MbD::ASMTAssembly::runSinglePendulum()
359361

360362
std::shared_ptr<ASMTAssembly> MbD::ASMTAssembly::assemblyFromFile(const std::string& fileName)
361363
{
364+
// https://stackoverflow.com/a/45867491
365+
#if __GNUC__ >= 8
362366
std::filesystem::path currentPath = std::filesystem::current_path();
363367
std::cout << "Current directory: " << currentPath << std::endl;
368+
#endif
364369

365370
std::ifstream stream(fileName);
366371
if (stream.fail()) {

OndselSolverMain/OndselSolver.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
* @brief Program to assemble a piston crank system.
1313
*********************************************************************/
1414

15-
#include <filesystem>
1615
#include "../OndselSolver/CADSystem.h"
1716
#include "../OndselSolver/CREATE.h"
1817
#include "../OndselSolver/GESpMatParPvPrecise.h"

0 commit comments

Comments
 (0)