0

我想在 QT 应用程序中使用 XSB prolog。我写:

#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();
}

但它会因错误消息“0x0 处的读取访问冲突......”而崩溃。有什么问题以及如何解决? 错误]

4

0 回答 0