0

I want to use XSB prolog in QT application. I wrote:

#include <QtWidgets/QApplication>
#include "mainwindow.h"
#include "cinterf.h"

int main(int argc, char *argv[])
{
    /* Initialize xsb */
    xsb_init_string((char*)("c:/Program Files (x86)/XSB -n"));
    char s[100] = "consult('g:/develop/qt/paid/kb').";
    int r = xsb_command_string(s);

    QApplication a(argc, argv);
    MainWindow w;
    w.show();

    return a.exec();
}

But it crashes with an error message "read access violation at 0x0 ...". What is the problem and how to fix it? The error]

false
  • 10,264
  • 13
  • 101
  • 209

0 Answers0