Re: installing Lingua::LinkParser on Win32




<natdavis_2000@xxxxxxxxx> wrote in message
news:1121973403.429959.97250@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

> Rob - I sure did download from there.
>
> >From my working directory in the blib\arch\auto\Lingua\LinkParser
> directory there is a lib file named LinkParser.lib, but is created when
> I run nmake.

That's not the '.lib' file that we need. We need a '.lib' file built using
the '.c' and '.h' files from the link41b.zip file.

I did the following:
1) Unzip link41b.zip to F:/link_parser
2) Copy the '.h' files from F:/link_parser/include to F:/link_parser/src
3) cd to the F:/link_parser/src folder
4) In F:/link_parser/src/resources.c change the 2 occurrences of '#if
!defined(WIN32)' to '#ifndef _WIN32'. On my box at least, it seems that
'WIN32' is not defined, though _WIN32 is defined. (If resources.c compiles
ok, then that's all that matters.)
5) run 'cl /MD -c *.c' (you'll get errors wrt constituent-example.c - I
don't think that matters)
6) then run 'lib /out:linkparser.lib *.obj'

Then, in the Lingua::LinkParser source, place copies of the afore-mentioned
'.h' files in the top level folder (same folder as the Makefile.PL), and
change the Makefile.PL so that it consists simply of:

---start---
use ExtUtils::MakeMaker;

WriteMakefile(
'NAME' => "Lingua::LinkParser",
'VERSION_FROM' => "LinkParser.pm",
'LIBS' => "-LF:/link_parser/link41b/src -llinkparser",
'OBJECT' => "LinkParser.o @objects",
'DEFINE' => "",
'INC' => "-L$LP_DIR/obj -I$LP_DIR/include"
);
---finish---

You'll probably need to change the 'LIBS' entry to specify the path to your
link41b/src folder. (You should also be able to delete the 'OBJECT',
'DEFINE' and 'INC' entries entirely if you wish - though it didn't seem to
matter for me.)

Then open 'LinkParser.pm' and edit the value of $DATA_DIR so that it
specifies the location of the 'data' directory. In my case:

$DATA_DIR='F:/link_parser/link41b/data';

Then run 'nmake clean' (to get rid of any previously built makefile, blib,
etc.), followed by 'perl Makefile.PL' , and 'nmake'.

That should get the thing compiled ok - but the problems don't quite end
there. When I run 'nmake test', I get:

Microsoft (R) Program Maintenance Utility Version 7.00.9466
Copyright (C) Microsoft Corporation. All rights reserved.

F:\perlvc7\bin\perl.exe "-Iblib\lib" "-Iblib\arch" test.pl
1..15
ok 1
Dictionary creation failed at test.pl line 19
NMAKE : fatal error U1077: 'F:\perlvc7\bin\perl.exe' : return code '0xff'
Stop.

Not quite sure why that is - looks to have something to do with the
'dictionary_create()' function. I'll leave that part of it up to you for the
moment - but if you have trouble getting it sorted, then let us know, and
I'll take a look. (I'll probably take another look later anyway - in which
case I'll post again if I work out what's needed.)

Hth.

Cheers,
Rob



.



Relevant Pages

  • Re: IE6 - downloads automatically delete
    ... I've tried saving it in a number of different folders - same ... There are no settings that I'm aware of, ... "Rob Parsons" wrote: ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Network problem with computer name!
    ... Either by double clicking the "Network" icon on the desktop ... It was an Excel spreadsheet in a folder on Rob named "Shared files on Rob" ... > Via what computer name on the other machine can you access the "unknown" ...
    (microsoft.public.windowsxp.network_web)
  • Re: Folder Open Behavior
    ... > Hi Rob, ... > Click on the File Types tab and select "Folder". ... > "Set Default" button should also restore the original behavior. ... >> it opens a search window. ...
    (microsoft.public.windowsxp.basics)
  • Re: Deleting Outlook Express 6 .dbx files
    ... > even though I have selected "Empty messages from 'Deleted Items' ... > folder on exit" my Deleted Items.dbx file is 27451kb. ... > Many thanks - Rob ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Win32.WINDOWPOS
    ... Can anybody tell me where this Win32 comes from? ... Or google "best way to deal with windowpos" ... Rob ... Prev by Date: ...
    (microsoft.public.dotnet.framework.interop)