SHARE
TWEET

Untitled

quantumech May 23rd, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <cinterf.h>
  2. #include <stdio.h>
  3.  
  4. int main()
  5. {
  6.     // 1) Initialize XSB runtime. xsb_init_string()'s argument must point to {XSB_DIR}
  7.     //    xsb_init_string() returns 'true' if an error occurs during initialization, hence the error handling
  8.     //    The path works with least problems if it is an absolute path, rather then relative.
  9.     if(xsb_init_string("path/to/XSB"))
  10.     {
  11.         // xsb_get_init_error_message() returns the last error that occured while XSB initializes the runtime
  12.         printf("++XSB failed to initialize with error: %s\n", xsb_get_init_error_message());
  13.         exit(-1);
  14.     }
  15.     else // 2) If XSB successfully initialized
  16.     {
  17.         // Print 'XSB successfully initialized'
  18.         printf("XSB successfully initialized!");
  19.  
  20.         // Terminate XSB
  21.         xsb_close();
  22.     }
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top