【问题标题】:Interface between C# and SWI-PrologC# 和 SWI-Prolog 之间的接口
【发布时间】:2014-03-11 18:16:04
【问题描述】:

我已经编写了一个 prolog 程序,我想在 C# 中使用该程序,即我想询问 swi-prolog 并在我的 C# 代码中使用答案...

我已经在http://www.swi-prolog.org/contrib/CSharp.html尝试了到 C# 的 SWI-Prolog 接口

我的代码如下......:

    Environment.SetEnvironmentVariable("SWI_HOME_DIR", @"C:\Program Files (x86)\swipl\");

    if (!PlEngine.IsInitialized)
            {
                try
               {
                  SbsSW.SwiPlCs.PlEngine.Initialize(new string[] { "" });
              }
               catch (System.Exception ex)
                {
                    Console.WriteLine("Failure initializing Prolog: " + ex.Message);
                   // return;
               }
            }
          Console.ReadLine();
    }

但我收到此错误:“不是有效的 Win32 应用程序。(来自 HRESULT:0x800700C1 的异常”

我使用 64 位 windows 7 ... 怎么办?现在?

提前致谢

【问题讨论】:

    标签: c# swi-prolog


    【解决方案1】:

    有一个SWI-Prolog interface to C#。如果这不能满足您的需求,请更新您的问题,并详细说明您需要什么。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-06-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多