joeylib2/examples/hello/hello.c

29 lines
740 B
C

// JoeyLib hello-world example.
//
// Validates that the C API headers, library, and per-platform link
// path all work end-to-end. Runs in HOST_MODE_OS so it can use stdio.
#include <stdio.h>
#include <joey/joey.h>
int main(void) {
JoeyConfigT config;
config.hostMode = HOST_MODE_OS;
config.codegenBytes = 8 * 1024;
config.maxSurfaces = 4;
config.audioBytes = 64UL * 1024;
config.assetBytes = 128UL * 1024;
if (!joeyInit(&config)) {
fprintf(stderr, "joeyInit failed: %s\n", joeyLastError());
return 1;
}
printf("JoeyLib %s\n", joeyVersionString());
printf("Platform: %s\n", joeyPlatformName());
printf("Hello from JoeyLib.\n");
joeyShutdown();
return 0;
}