#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <turbojpeg.h>

int main() {
  tjhandle handle = NULL;
  int result = 0;
  
  handle = tjInitCompress();
  if (handle == NULL) {
    printf("Error initializing TurboJPEG compressor\n");
    return -1;
  }
  
  printf("Successfully initialized TurboJPEG compressor\n");
  
  result = tjDestroy(handle);
  if (result < 0) {
    printf("Error destroying TurboJPEG instance\n");
    return -1;
  }
  
  printf("Successfully destroyed TurboJPEG instance\n");
  
  return 0;
}