Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

'nmake' is not recognized as an internal or external command,

by ch123 (Initiate)
on Oct 28, 2009 at 07:21 UTC ( #803600=perlquestion: print w/ replies, xml ) Need Help??
ch123 has asked for the wisdom of the Perl Monks concerning the following question:

Hi All, I want to call a C function from perl program.I am using ActiveState Perl 5.8.9. I installed "Inline" module from ppm(perl package manager)

This is the code which i have written

#!/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" ); }

when I run this code I am getting following error message,

"'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: D:\UI\_Inline\build\c_pl_5cd4
To debug the problem, cd to the build directory, and inspect the outpu +t files at D:\UI\ line 0 INIT failed--call queue aborted".

Then I installed "nmake" and copied NMAKE.EXE and namke.ERR files to c:\WINDOWS\System32 and added "c:\WINDOWS\System32;" in the path variable but no use still i am getting the same error

Output file mentioned in the path above D:\UI\_Inline\build\c_pl_5cd4 has the following contents

Unable to find a perl 5 (by these names: D:\Softwares\Perl\Perl5.8\bin +\perl.exe perl.exe perl5.exe perl5.8.9.exe miniperl.exe, in these dir +s: . D:\Softwares\Perl\Perl5.8\site\bin D:\Softwares\Perl\Perl5.8\bin + C:\Perl\site\bin C:\Perl\bin D:\Softwares\bin\ D:\Softwares\Perl\sit +e\bin D:\Softwares\Perl\bin D:\Softwares\Perl\Perl5.10\site\bin D:\So +ftwares\Perl\Perl5.10\bin D:\Softwares\Perl\bin\ D:\Perl\bin\ C:\WIND +OWS\system32 C:\WINDOWS C:\Serena\CHANGE~1\DIMENS~1\9.1\PROG C:\WINDO +WS\system32\WBEM C:\Program Files\IVI\bin C:\VXIPNP\WinNT\Bin C:\VXIP +NP\WinNT\Bin\ C:\WINDOWS\system32\NMAKE.exe D:\Softwares\Perl\Perl5.8 +\bin\perl.exe D:\Softwares\TK\bin C:\Tcl\bin C:\Program Files\Microso +ft Visual Studio\Common\Tools\WinNT C:\Program Files\Microsoft Visual + Studio\Common\MSDev98\Bin C:\Program Files\Microsoft Visual Studio\C +ommon\Tools C:\Program Files\Microsoft Visual Studio\VC98\bin D:\Soft +wares\Perl\Perl5.8\site\lib D:\Softwares\Perl\Perl5.8\bin) Writing Makefile for c_pl_5cd4

Can any body help me in solving this.

Thanks in advance


Comment on 'nmake' is not recognized as an internal or external command,
Select or Download Code
Replies are listed 'Best First'.
Re: 'nmake' is not recognized as an internal or external command,
by moritz (Cardinal) on Oct 28, 2009 at 07:37 UTC
    You have to install nmake.
Re: 'nmake' is not recognized as an internal or external command,
by syphilis (Chancellor) on Oct 28, 2009 at 08:16 UTC
    I installed "Inline" module from ppm(perl package manager)

    Not much point in doing that, unfortuantely, as you still need a C compiler and make utility to make use of Inline::C.

    It's better to install the compiler and make utility first (eg run 'ppm install mingw' for dmake/gcc - or install one of the free MS compilers if you prefer to be using nmake/cl) and then build Inline::C from CPAN source. If the build succeeds then you're right to go.


      Hi Rob,

      I am new to Perl.Can you explain me clearly what needs to be done



        Can you explain me clearly what needs to be done

        Assuming you have ActivePerl, first run ppm install mingw, then run cpan -i Inline::C.

        That should do it (unless your earlier attempts to install nmake pose a problem). If you have any trouble with that, let us know what has gone wrong. (Also take note of the help provided by the other conrtributors to this thread.)


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://803600]
Approved by moritz
Front-paged by tye
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2015-11-25 06:24 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (671 votes), past polls