A problem while trying to interface C# with prolog
Önder Açıkgöz <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <CAGt_WZ=eJrhN9ST2iDpt8Q309Kua-CHhTp1j9Rwy=EJesOfUXg@mail.gmail.com> |
Hello there,
I am having some difficulty while trying to interface c# with swi-prolog. I
tried to follow this method : http://www.swi-prolog.org/contrib/CSharp.html
using visual studio 2008 on 64 bit windows 7 machine. My code is quite
simle but i cannot get it to work :( :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SbsSW.SwiPlCs;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Environment.SetEnvironmentVariable("SWI_HOME_DIR", @"C:\Program
Files (x86)\pl\");
Environment.SetEnvironmentVariable("PATH", @"C:\Program Files
(x86)\pl\");
Environment.SetEnvironmentVariable("PATH", @"C:\Program Files
(x86)\pl\bin\");
if (!PlEngine.IsInitialized)
{
try
{
SbsSW.SwiPlCs.PlEngine.Initialize(new string[] { ""
});
}
catch (System.Exception ex)
{
Console.WriteLine("Failure initializing Prolog: " +
ex.Message);
// return;
}
}
Console.ReadLine();
}
}
}
I get error messages like "the specified module could not found" or " is
not a valid Win32 application " depending on the version of SwiPlCs.dll
file...
I will be very grateful for any help...
Thank you
Önder
-------------- next part --------------
HTML attachment scrubbed and removed