Link to home
Create AccountLog in
Avatar of MetraTechIT
MetraTechIT

asked on

Error during nmake - U1077 cl in not recognized as an internal or external command

I am installing swatch (module for use by Snort) and it requires several specific modules, like date, time formatting, etc.  Using ActiveState Perl, I tried to prepare the code but the above error plagues the install.  The bit-vector module is available at CPAN.  Thanks!
Avatar of Suhas .
Suhas .
Flag of United States of America image

for date you can use

@date = localtime(time)  for today's date
$date[3] ->date
$date[4] + 1 -> month
$date[5] + 1900 -> year
$date[0] -> seconds
$date[1] -> minutes
$date[2] -> hours

then you can append in which ever format you want....

localtime(time - n*24*60*60) -> to extract n previous days

easily you will get the date and time :)
Avatar of MetraTechIT
MetraTechIT

ASKER

I am not much of a Perl programmer (yet) and was hoping to use the modules as outlined by Snort/Swatch/CPAN.  any idea why the bit-vector make failed?
basically you will get that error if the commands are not supported by your system,

if you have those commands and want to run same,
you have to mention the path of those in environment variables.
To be more descript:

        cl -c  -nologo -O1 -MD -Zi -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAV
E_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX -
O1 -MD -Zi -DNDEBUG    -DVERSION=\"6.4\"  -DXS_VERSION=\"6.4\"  -IC:\Perl\lib\CO
RE  BitVector.c
'cl' is not recognized as an internal or external command,
operable program or batch file.
NMAKE :  U1077:
Stop.

It appears to be attempting a *nix commend... ??
Apparently, cl is the "linker" in Visual Studio.  Since the Perl library uses C code it must link.  I am looking for a free version of such a tool.
You didn't say exactly which bit vector module it requires, but ActivePerl has access to a number of them that you can use, ie:

ppm> search vector
Searching in Active Repositories
  1. Bit-Vector                [6.4] Bit-Vector
  2. Bit-Vector-Minimal        [1.3] Bit-Vector-Minimal
  3. Bit-Vector-Named        [0.023] Bit-Vector-Named
  4. Math-Vector-SortIndexes  [0.02] Math-Vector-SortIndexes
  5. Math-VectorReal          [1.02] Math-VectorReal
  6. Search-VectorSpace       [0.02] Search-VectorSpace


Assuming, it is the first one, you type in:

install Bit-Vector

at the ppm prompt.

If you haven't discovered the Perl Package Manager yet, either type in 'ppm' from the Windows command line, or

Start->Programs->ActivePerl->Perl Package Manager

The ActivePerl packages are all precompiled (if they have C components) for windows, so you don't need a compiler to install them.
ASKER CERTIFIED SOLUTION
Avatar of Tintin
Tintin

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
There are lots of problems/solutions on E-E about this problem, but none solve the fundamental problem.  Trying to install a CPAN (not ActiveState/ppm) module requires running make (nmake).  

nmake consistently returns this ['cl' is not recognized as an internal or external command] error.  

I've picked up that this is the C linker from MS Visual C++, and that it needs to be there.

But I'm not a C++ programer, don't have it, don't need it, don't want it, ain't payin' for it.  I'm just trying to install a Perl module.  

Does anyone know how to install a CPAN module on Windows, given this dependency of nmake on C++?