Interface between C# and SWI-Prolog

0

I have written a prolog program and I want to use the program within C#, that is i want to ask queries to swi-prolog and use answers within my C# code...

I have tried SWI-Prolog interface to C# at : http://www.swi-prolog.org/contrib/CSharp.html

My code is like as follows....:

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

But I get this error : "is not a valid Win32 application. (Exception from HRESULT:0x800700C1"

I use 64 bit windows 7 ... What to do? now?

Thanks in advance

c#
swi-prolog
asked on Stack Overflow Mar 11, 2014 by user3407292 • edited Mar 11, 2014 by user3407292

1 Answer

0

There is a SWI-Prolog interface to C#. If that does not fulfil your needs, please update your question with some details on what you need on top of that.

answered on Stack Overflow Mar 11, 2014 by Paul-Jan

User contributions licensed under CC BY-SA 3.0