Re: installing Lingua::LinkParser on Win32
- From: "Sisyphus" <sisyphus1@xxxxxxxxxxxxxxxxx>
- Date: Fri, 22 Jul 2005 18:17:49 +1000
<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
.
- Follow-Ups:
- Re: installing Lingua::LinkParser on Win32
- From: Sisyphus
- Re: installing Lingua::LinkParser on Win32
- References:
- installing Lingua::LinkParser on Win32
- From: natdavis_2000
- Re: installing Lingua::LinkParser on Win32
- From: Sisyphus
- Re: installing Lingua::LinkParser on Win32
- From: natdavis_2000
- installing Lingua::LinkParser on Win32
- Prev by Date: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.5 $)
- Next by Date: Re: comments in the middle of a hash variable ?
- Previous by thread: Re: installing Lingua::LinkParser on Win32
- Next by thread: Re: installing Lingua::LinkParser on Win32
- Index(es):
Relevant Pages
|