diff --git a/modules/DependsOnPrint/src/DependsOnPrint.cpp b/modules/DependsOnPrint/src/DependsOnPrint.cpp index ffd9270..e221f35 100644 --- a/modules/DependsOnPrint/src/DependsOnPrint.cpp +++ b/modules/DependsOnPrint/src/DependsOnPrint.cpp @@ -1,9 +1,9 @@ #include "DependsOnPrint.h" -DependsOnPrint::DependsOnPrint(void* h, App& a) : Module(h, a) { +DependsOnPrint::DependsOnPrint(void* h, Archimedes::App* a) : Module(h, a) { name = "DependsOnPrint"; - deps["Print"] = "/home/nathan/Projects/Archimedes/result-2/bin/Print"; + deps["Print"] = "/home/nathan/Projects/Archimedes/result-1/bin/Print"; } DependsOnPrint::~DependsOnPrint() { @@ -12,5 +12,5 @@ DependsOnPrint::~DependsOnPrint() { void DependsOnPrint::run() { std::cout << "DependsOnPrint lib loaded and run!\n"; - app.stopModule(self); + app->stopModule(self); } diff --git a/modules/DependsOnPrint/src/DependsOnPrint.h b/modules/DependsOnPrint/src/DependsOnPrint.h index 1dbd66b..3fe295f 100644 --- a/modules/DependsOnPrint/src/DependsOnPrint.h +++ b/modules/DependsOnPrint/src/DependsOnPrint.h @@ -1,9 +1,9 @@ #include "Archimedes.h" -class DependsOnPrint : public Module { +class DependsOnPrint : public Archimedes::Module { public: - DependsOnPrint(void*, App&); + DependsOnPrint(void*, Archimedes::App*); ~DependsOnPrint(); void run(); void onLoad() {} @@ -11,7 +11,7 @@ class DependsOnPrint : public Module { }; extern "C" { - Module* create(void* handle, App& app) { + Archimedes::Module* create(void* handle, Archimedes::App* app) { return new DependsOnPrint(handle, app); } } diff --git a/modules/DependsOnPrintStatic/src/DependsOnPrintStatic.h b/modules/DependsOnPrintStatic/src/DependsOnPrintStatic.h index 5dede73..e2157a3 100644 --- a/modules/DependsOnPrintStatic/src/DependsOnPrintStatic.h +++ b/modules/DependsOnPrintStatic/src/DependsOnPrintStatic.h @@ -10,8 +10,12 @@ class DependsOnPrintStatic : public Archimedes::Module { }; +#ifndef DEPENDSONPRINTSTATIC_STATIC + extern "C" { Archimedes::Module* create(void* handle, Archimedes::App* app) { return new DependsOnPrintStatic(handle, app); } } + +#endif diff --git a/modules/Print/src/Print.cpp b/modules/Print/src/Print.cpp index 509bf89..057a316 100644 --- a/modules/Print/src/Print.cpp +++ b/modules/Print/src/Print.cpp @@ -1,3 +1,4 @@ +#define PRINT_STATIC #include "Print.h" Print::Print(void* h, Archimedes::App* a) : Archimedes::Module(h, a) { diff --git a/modules/Print/src/Print.h b/modules/Print/src/Print.h index 973402e..682f490 100644 --- a/modules/Print/src/Print.h +++ b/modules/Print/src/Print.h @@ -10,8 +10,12 @@ class Print : public Archimedes::Module { }; +#ifndef PRINT_STATIC + extern "C" { Archimedes::Module* create(void* handle, Archimedes::App* app) { return new Print(handle, app); } } + +#endif