Initial rework
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
name: archive
|
||||
gpid: examples
|
||||
semv: 1.0.0
|
||||
|
||||
targets:
|
||||
- name: example
|
||||
type: archive
|
||||
srcs: [./example.cpp]
|
||||
|
||||
- name: hello
|
||||
type: program
|
||||
deps: [example]
|
||||
srcs: [./entry.cpp]
|
||||
@@ -0,0 +1,5 @@
|
||||
extern "C" void print(const char* str);
|
||||
|
||||
int main() {
|
||||
print("Hello, World!");
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#include <iostream>
|
||||
#if __cplusplus >= 202302L
|
||||
# define do_print(x) std::print(x)
|
||||
#else // Old C++ version.
|
||||
# define do_print(x) std::cout << x << std::endl
|
||||
#endif // Check C++ version.
|
||||
|
||||
|
||||
extern "C" void print(const char* str) {
|
||||
do_print(str);
|
||||
}
|
||||
Reference in New Issue
Block a user