Init. Copied over heload, made a minimal tester.

This commit is contained in:
2025-03-16 18:46:12 +02:00
commit 21bf4d8715
12 changed files with 646 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
project(Minimal)
set( CMAKE_EXPORT_COMPILE_COMMANDS ON )
add_executable(minimal
minimal.cpp
)
add_library(mini SHARED
minimal_lib.cpp
minimal_lib.h
)
target_link_libraries(minimal mini)

18
test/manual/minimal.cpp Normal file
View File

@@ -0,0 +1,18 @@
#include "minimal_lib.h"
#include <chrono>
#include <cstdio>
#include <thread>
int main(int argc, char *argv[]) {
int modified = -1;
while (modified != 0) {
modified = minimal_lib::getModified(5);
printf("getModified(5): %d\n", modified);
std::this_thread::sleep_for(std::chrono::seconds(1));
}
return 0;
}

View File

@@ -0,0 +1,7 @@
#include "minimal_lib.h"
namespace minimal_lib {
int getModified(int x) { return x + 1; }
} // namespace minimal_lib

11
test/manual/minimal_lib.h Normal file
View File

@@ -0,0 +1,11 @@
#ifndef MINIMAL_LIB_H_
#define MINIMAL_LIB_H_
namespace minimal_lib {
static int value = 5;
int getModified(int x);
}
#endif // MINIMAL_LIB_H_