summaryrefslogtreecommitdiffhomepage
path: root/example/example_01_hello_world
diff options
context:
space:
mode:
Diffstat (limited to 'example/example_01_hello_world')
-rw-r--r--example/example_01_hello_world/hello_world.cc7
-rw-r--r--example/example_01_hello_world/posix.json10
-rw-r--r--example/example_01_hello_world/win64.json10
3 files changed, 27 insertions, 0 deletions
diff --git a/example/example_01_hello_world/hello_world.cc b/example/example_01_hello_world/hello_world.cc
new file mode 100644
index 0000000..ae47ce8
--- /dev/null
+++ b/example/example_01_hello_world/hello_world.cc
@@ -0,0 +1,7 @@
+#include <iostream>
+#include <string>
+
+int main(int argc, char** argv) {
+ std::cout << "hello, world!\n";
+ return 0;
+}
diff --git a/example/example_01_hello_world/posix.json b/example/example_01_hello_world/posix.json
new file mode 100644
index 0000000..197e4a2
--- /dev/null
+++ b/example/example_01_hello_world/posix.json
@@ -0,0 +1,10 @@
+{
+ "compiler_path": "clang++",
+ "compiler_std": "c++20",
+ "headers_path": ["lib"],
+ "sources_path": ["hello_world.cc"],
+ "output_name": "./hello_world.elf",
+ "compiler_flags": ["-fPIC"],
+ "cpp_macros": ["FOO_MACRO"],
+ "run_after_build": true
+}
diff --git a/example/example_01_hello_world/win64.json b/example/example_01_hello_world/win64.json
new file mode 100644
index 0000000..4545228
--- /dev/null
+++ b/example/example_01_hello_world/win64.json
@@ -0,0 +1,10 @@
+{
+ "compiler_path": "x86_64-w64-mingw32-g++",
+ "compiler_std": "c++20",
+ "headers_path": ["lib"],
+ "sources_path": ["hello_world.cc"],
+ "output_name": "./hello_world.elf",
+ "compiler_flags": ["-fPIC"],
+ "cpp_macros": ["FOO_MACRO"],
+ "run_after_build": true
+}