Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

nMake Error

by Anonymous Monk
on Jul 27, 2004 at 18:12 UTC ( #377811=perlquestion: print w/replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Good Day
Im new to perl and I would like to add the Template-Toolkit module in Windows. I followed the instruction above.
C:\> perl Makefile.PL C:\> nmake C:\> nmake test C:\> nmake install
I have downloaded the nMake program from this website and executed it. I placed the the extracted Template-Toolkit module and nMake under the C:\WINNT directory.   The first command "perl Makefile.PL" was successful When I executed nMake an error occured particularly

cl -c -nologo -Gf -W3 -MD -Zi -DNDEBUG -01 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -01 -DVERSION=\"2.09\ -DXS_VERSION=\"2.09\" "-IC:\Perl\lib\CORE" Stash.c
'cl' is not recognized as an internal or external command, operable program or batch file.
NMAKE : fatal error U1077: 'C:\WINNT\system32\cmd.exe' : return code '0x1' Stop
NMAKE : fatal error U1077: 'C:\WINNT\system32\cmd.exe' : return code '0x2' Stop

Has anybody encountered this problem?   How can this be fixed?
Thanks
Chester

janitored by ybiC: Format tweaks for legibility, reposted anonymously as SOPW root (more appropriate than reply in this Tutorial)

Replies are listed 'Best First'.
Re^2: nMake Error
by tachyon (Chancellor) on Jul 26, 2004 at 10:45 UTC

    CL.EXE is the M$ command line compiler. TT2 contains C/XS code that need compiling, you don't have it so it does not compile. Get a binary distro (the Win32 port) from http://www.template-toolkit.org/download.html. Did you consider the README? It is often a good idea to READIT.

    cheers

    tachyon

      Thanks tachyon

      that really helped. I downloaded cl.exe and link.exe to be able to execute the nmake command. However an error occured during link particularly

      link -out:..\blib\arch\auto\Template\Stash\XS\XS.dll -dll -nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\Perl\lib\CORE" -machine:x86 Stash.obj C:\Perl\lib\CORE\perl158.lib oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.lib.mpr.lib winm.lib version.lib odbc32.lib odbc32.lib msvcrt.lib -def:XS.def LINK : fatal error LNK1181: cannot open input file "Stash.obj" NMAKE : fatal error U1077: 'C:\WINNT\system32\cmd.exe' : return code '0x49d' Stop. NAMKE : fatal error U1077: 'C:\WINNT\system32\cmd.exe' : return code '0x2' Stop.

      Did I do something wrong? Did I download the correct cl.exe and link.exe? Or is there something wrong with the Template-Toolkit module i downloaded?

      Thanks

      cagaw
        I recommend you use a precompiled binary - you can find a ppm here If you want to compile it yourself read this tutorial I put up a year or two ago: A Practical Guide to Compiling C based Modules under ActiveState using Microsoft C++. Note that as well as cl.exe and link.exe you also need all the header and library files, in the right spots, with the correct ENV vars set of cl will choke. To give you an idea we commonly use a compact version of VCC with just cl, the linkers, assemblers and the header and library files. It is 18MB zipped (70MB odd unzipped). This is a lot better than VCC which is 2GB for a full install and takes several hours.

        FWIW It installs perfectly (just tested it on a Win32 box) you just need a working compiler setup

        [snip] cp lib/Template/Directive.pm blib\lib\Template\Directive.pm cp lib/Template/Manual/Refs.pod blib\lib\Template\Manual\Refs.pod cp lib/Template/Plugin/XML/DOM.pm blib\lib\Template\Plugin\XML\DOM.pm D:\Perl\bin\perl.exe -ID:\Perl\lib -ID:\Perl\lib D:\Perl\lib\E +xtUtils/xsubpp -typemap D:\Perl\lib\ExtUtils\typemap Stash.xs > Stas +h .xsc && D:\Perl\bin\perl.exe -ID:\Perl\lib -ID:\Perl\lib -MExtUtils::C +ommand -e mv Stash.xsc Stash.c cl -c -nologo -O1 -MD -Zi -DNDEBUG -DWIN32 -D_CONSOLE -DNO_ST +RICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -D +P ERL_MSVCRT_READFIX -O1 -MD -Zi -DNDEBUG -DVERSION=\"2.13\" -DXS_VE +RSION=\"2.13\" -ID:\Perl\lib\CORE Stash.c Stash.c "Running Mkbootstrap for Template::Stash::XS ()" D:\Perl\bin\perl.exe -ID:\Perl\lib -ID:\Perl\lib -MExtUtils::C +ommand -e chmod 644 XS.bs D:\Perl\bin\perl.exe "-ID:\Perl\lib" "-ID:\Perl\lib" -MExtUtil +s::Mksymlists -e "Mksymlists('NAME' => 'Template::Stash::XS', 'DLBAS +E ' => 'XS', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'D +L_VARS' => []);" link -out:..\blib\arch\auto\Template\Stash\XS\XS.dll -dll -nol +ogo -nodefaultlib -debug -opt:ref,icf -libpath:"D:\Perl\lib\CORE" - +m achine:x86 Stash.obj D:\Perl\lib\CORE\perl56.lib oldnames.lib kernel +32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib s +h ell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.lib mp +r.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib -def: +X S.def Creating library ..\blib\arch\auto\Template\Stash\XS\XS.lib and obj +ect ..\blib\arch\auto\Template\Stash\XS\XS.exp D:\Perl\bin\perl.exe -ID:\Perl\lib -ID:\Perl\lib -MExtUtils::C +ommand -e chmod 755 ..\blib\arch\auto\Template\Stash\XS\XS.dll D:\Perl\bin\perl.exe -ID:\Perl\lib -ID:\Perl\lib -MExtUtils::C +ommand -e cp XS.bs ..\blib\arch\auto\Template\Stash\XS\XS.bs D:\Perl\bin\perl.exe -ID:\Perl\lib -ID:\Perl\lib -MExtUtils::C +ommand -e chmod 644 ..\blib\arch\auto\Template\Stash\XS\XS.bs D:\Perl\bin\perl.exe -ID:\Perl\lib -ID:\Perl\lib -MExtUtils::C +ommand -e cp bin/ttree blib\script\ttree D:\Perl\bin\perl.exe -ID:\Perl\lib -ID:\Perl\lib -e "system q +q[pl2bat.bat ].shift" blib\script\ttree D:\Perl\bin\perl.exe -ID:\Perl\lib -ID:\Perl\lib -MExtUtils::C +ommand -e cp bin/tpage blib\script\tpage D:\Perl\bin\perl.exe -ID:\Perl\lib -ID:\Perl\lib -e "system q +q[pl2bat.bat ].shift" blib\script\tpage C:\Template-Toolkit-2.13>

        cheers

        tachyon

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://377811]
Approved by ybiC
help
Chatterbox?
[ambrus]: And if you need a syntax highlighter to color parenthesis green and numbers black and letters blue, then you're using the wrong font.
[ambrus]: I have to tolerate syntax highlighters when other people use them, but I don't use them myself. And sorry for the rant.
[GotToBTru]: I appreciate the ability to highlight matching brackets/ parentheses/ braces, both for my own code and the inconsistently indented code of others
[Corion]: I like editors that automatically highlight the matching parenthesis (like % in vi), but that's roughly the extent to which I like editor support ;)
[GotToBTru]: same here Corion.
[Corion]: I tried for a short time (well, 8 hours now) to get Perl::Tidy set up but then found that it doesn't support (new-style) signatures and then stopped again ;))

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2017-02-27 12:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (385 votes). Check out past polls.