joeylib2/examples/hello/hello.c
2026-10-13 14:01:46 -05:00

29 lines
692 B
C

// Part of JoeyLib, Copyright (c) 2026 Scott Duensing, under the MIT License.
// See LICENSE.md for license information.
// SPDX-License-Identifier: MIT
//
// JoeyLib hello-world example.
//
// Validates that the C API headers, library, and per-platform link
// path all work end-to-end.
#include <stdio.h>
#include <joey/joey.h>
int main(void) {
jlConfigT config;
config.codegenBytes = 8 * 1024;
if (!jlInit(&config)) {
fprintf(stderr, "jlInit failed: %s\n", jlLastError());
return 1;
}
printf("JoeyLib %s\n", jlVersionString());
printf("Platform: %s\n", jlPlatformName());
printf("Hello from JoeyLib.\n");
jlShutdown();
return 0;
}