Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cinterf.h>
- #include <stdio.h>
- int main()
- {
- // 1) Initialize XSB runtime. xsb_init_string()'s argument must point to {XSB_DIR}
- // xsb_init_string() returns 'true' if an error occurs during initialization, hence the error handling
- // The path works with least problems if it is an absolute path, rather then relative.
- if(xsb_init_string("path/to/XSB"))
- {
- // xsb_get_init_error_message() returns the last error that occured while XSB initializes the runtime
- printf("++XSB failed to initialize with error: %s\n", xsb_get_init_error_message());
- exit(-1);
- }
- else // 2) If XSB successfully initialized
- {
- // Print 'XSB successfully initialized'
- printf("XSB successfully initialized!");
- // Terminate XSB
- xsb_close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement