Hi All,

I have a simple list generation problem, where my program needs to generate a series of lists from a few rules. The SQL would be fairly nightmarish, but I thought maybe some Prolog might help. So I tried to install AI::Prolog under MSW. I seem to be having a lot of problems with the dependencies. So I have two questions:

1 - Is there an easier version of Prolog to install?
2 - Can I fix this one?

I am working through the errors one by one, but the current one just goes straight over my head.

If I try to run the program, with some failed dependencies to try to see what works and what doesn't the code:

use warnings; use strict; use Term::ReadLine; use Term::ReadKey; use Pod::Usage 1.12; use aliased 'AI::Prolog';

Generates:

Can't load 'C:/Perl/site/lib/auto/Term/ReadKey/ReadKey.dll' for module + Term::ReadKey: load_file:Invalid access to memory location at C:/Per +l/lib/DynaLoader.pm line 229. at C:\Documents and Settings\Steve.Cookson\My Documents\Projects\Endo +scopy System\Endoscopia\aiprolog.pl line 21 Compilation failed in require at C:\Documents and Settings\Steve.Cooks +on\My Documents\Projects\Endoscopy System\Endoscopia\aiprolog.pl line + 21. BEGIN failed--compilation aborted at C:\Documents and Settings\Steve.C +ookson\My Documents\Projects\Endoscopy System\Endoscopia\aiprolog.pl +line 21.
OK, so it looks like I have a problem with ReadKey. I check the download, it's fine. I run nmake, although it looks quite wordy, there are a couple of warnings, but no fatal errors:
Microsoft (R) Program Maintenance Utility Version 1.50 Copyright (c) Microsoft Corp 1988-94. All rights reserved. gcc -c -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_F +CRYPT -DNO _HASH_SEED -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_C +ONTEXT -DP ERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -DHASATTRIBUTE -fn +o-strict-a liasing -O2 -DVERSION=\"2.30\" -DXS_VERSION=\"2.30\" "-IC:\Perl\l +ib\CORE" ReadKey.c In file included from ReadKey.xs:6: ppport.h:227:1: warning: "PERL_UNUSED_DECL" redefined In file included from ReadKey.xs:4: C:/Perl/lib/CORE/perl.h:188:1: warning: this is the location of the pr +evious def inition Running Mkbootstrap for Term::ReadKey () C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 644 ReadKey. +bs dlltool --def ReadKey.def --output-exp dll.exp g++ -o blib\arch\auto\Term\ReadKey\ReadKey.dll -Wl,--base-file + -Wl,dll.b ase -mdll -L"C:\Perl\lib\CORE" ReadKey.o -Wl,--image-base,0x19000000 +C:\Perl\li b\CORE\perl58.lib -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -l +advapi32 - lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm - +lversion - lodbc32 -lodbccp32 -lmsvcrt dll.exp dlltool --def ReadKey.def --base-file dll.base --output-exp dl +l.exp g++ -o blib\arch\auto\Term\ReadKey\ReadKey.dll -mdll -L"C:\Per +l\lib\CORE " ReadKey.o -Wl,--image-base,0x19000000 C:\Perl\lib\CORE\perl58.lib - +lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -l +oleaut32 - lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 +-lmsvcrt d ll.exp C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 755 blib\arc +h\auto\Ter m\ReadKey\ReadKey.dll C:\Perl\bin\perl.exe -MExtUtils::Command -e cp ReadKey.bs blib +\arch\auto \Term\ReadKey\ReadKey.bs C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 644 blib\arc +h\auto\Ter m\ReadKey\ReadKey.bs
Howver, when I run nmake test, I get fatal errors:
Microsoft (R) Program Maintenance Utility Version 1.50 Copyright (c) Microsoft Corp 1988-94. All rights reserved. C:\Perl\bin\perl.exe "-Iblib\lib" "-Iblib\arch" -w test.pl 1 .. 8 Can't load 'blib\arch/auto/Term/ReadKey/ReadKey.dll' for module Term:: +ReadKey: l oad_file:Invalid access to memory location at C:/Perl/lib/DynaLoader.p +m line 229 . at test.pl line 21 Compilation failed in require at test.pl line 21. BEGIN failed--compilation aborted at test.pl line 21. NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code + '0x2' Stop.

So Load up test.pl in Komodo and get the same error. The line in question is just:

use Term::ReadKey;

Your wisdom would be appreciated

Regards

PS I see Term-ReadKey is a module on PPM, so I pressed the validate button and it says "fine", or words to that effect.


In reply to Which version of Prolog by Steve_BZ

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.