Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,

I'm new to Inline. I just installed it using ppm and tried the hello program.

#!/usr/bin/perl -w use Inline C; use strict; hello_inline(); __END__ __C__ #include <stdio.h> void hello_inline( ) { printf( "Hello World. Best Regards from Inline\n" ); }
I get the following error message.
>C:\...\hello.pl 'nmake' is not recognized as an internal or external command, operable program or batch file. A problem was encountered while attempting to compile and install your + Inline C code. The command that failed was: nmake > out.make 2>&1 The build directory was: C:\...\_Inline\build\hello_pl_3492 To debug the problem, cd to the build directory, and inspect the outpu +t files. at ...\hello.pl line 0 INIT failed--call queue aborted.

I looked through the files created and can't find the nmake command. I'm using the microsoft visual C++ compiler (command line free version).

Thanks
IlanV

Replies are listed 'Best First'.
Re: Inline::C installation problem
by CountZero (Bishop) on Mar 29, 2004 at 20:06 UTC
    If you are on Windows, just put nmake.exe and nmake.err in your System32 folder. That's all there is to it, provided the config.pm in the CPAN-folder has no hardwired path to your nmake.exe (solution: just replace the entry in config.pm by 'nmake.exe' and it will be OK).

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Re: Inline::C installation problem
by Grygonos (Chaplain) on Mar 29, 2004 at 19:37 UTC

    nmake is a utility for ( among other things) building executables... its a Micro$oft product. You can search MSDN for it and find a free version of it laying around...

    Once you have nmake installed, you should make sure it's in your system path, and maybe your perl path too

    The suggestion is mainly a guess, but it's something to look into for sure.

    Grygonos
Re: Inline::C installation problem
by jZed (Prior) on Mar 29, 2004 at 20:03 UTC
    What OS are you on? If you're on win9x with command instead of cmd as the shell, I don't think Inline::C will work. I tried a number of things (including installing a win9x version of cmd) and also asked Ingy (author of Inline::C) and he didn't know of any solutions either.
      speaking from total ignoarance.. couldn't Inline::C just check $ENV{'COMSPEC'} if $^O was a win32 ? or is it something in the different of cmd and command shells? the cmd shell is quite a bit better.

      Grygonos
        It has to do with a difference in the shells, e.g. the 2>&1 redirection. I suspect if there was an easy fix, Ingy would have already added it.