Initial commit
This commit is contained in:
24
hello.cpp
Normal file
24
hello.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#include <cstdio>
|
||||
|
||||
extern "C" {
|
||||
#include "haxcc.h"
|
||||
}
|
||||
|
||||
auto main() -> int {
|
||||
std::printf("Hello, World!\n");
|
||||
std::printf("begin: %p, end: %p, len: %lu\n", (void*)mod_begin(), (void*)mod_end(), ((long)mod_end() - (long)mod_begin()) / sizeof(mod));
|
||||
std::printf("\n");
|
||||
|
||||
for (auto* it = mod_begin(); it != mod_end(); ++it) {
|
||||
it->init();
|
||||
}
|
||||
|
||||
std::printf("\n");
|
||||
std::printf("we're have init everything\n");
|
||||
std::printf("\n");
|
||||
|
||||
for (auto* it = mod_begin(); it != mod_end(); ++it) {
|
||||
it->done();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user