Ver Mensaje Individual
  #2 (permalink)  
Antiguo 07/07/2010, 15:01
Avatar de neodani
neodani
 
Fecha de Ingreso: marzo-2007
Mensajes: 1.811
Antigüedad: 17 años, 1 mes
Puntos: 20
Respuesta: Mostar colores por la terminal en windows

Encontré esta página pero me falla la librería y tampoco me deja instalarla, no sé si lo acabo de hacer bien del todo...

http://www.bribes.org/perl/ansi.html

Código PERL:
Ver original
  1. #!C:\perl\bin\perl.exe -w
  2. use Win32::Console::ANSI;
  3. use Term::ANSIColor;
  4.  
  5. print color 'bold blue';
  6. print "This text is bold blue.\n";
  7. print color 'reset';
  8. print "This text is normal.\n";
  9. print colored ("Bold yellow on magenta.\n", 'bold yellow on_magenta');
  10. print "This text is normal.\n";

Error al ejecutar el script

C:\Documents and Settings\Dani\Escritorio>test.pl
Can't locate Win32/Console/ANSI.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .) at C:\Documents and Settings\Dani\Escritorio\test.pl line 2.
BEGIN failed--compilation aborted at C:\Documents and Settings\Dani\Escritorio\test.pl line 2.


Error al instalar la librería

C:\Documents and Settings\Dani\Escritorio>cpan Win32
Going to read C:\Perl\cpan\Metadata
Database was generated on Tue, 06 Jul 2010 21:27:03 GMT
Running install for module 'Win32'
Running make for J/JD/JDB/Win32-0.39.tar.gz
Checksum for C:\Perl\cpan\sources\authors\id\J\JD\JDB\Win32-0.39.tar.gz ok
Win32-0.39/
Win32-0.39/Changes
Win32-0.39/longpath.inc
Win32-0.39/Makefile.PL
Win32-0.39/MANIFEST
Win32-0.39/META.yml
Win32-0.39/README
Win32-0.39/t/
Win32-0.39/t/CreateFile.t
Win32-0.39/t/ExpandEnvironmentStrings.t
Win32-0.39/t/GetCurrentThreadId.t
Win32-0.39/t/GetFileVersion.t
Win32-0.39/t/GetFolderPath.t
Win32-0.39/t/GetFullPathName.t
Win32-0.39/t/GetLongPathName.t
Win32-0.39/t/GetOSName.t
Win32-0.39/t/GetOSVersion.t
Win32-0.39/t/GetShortPathName.t
Win32-0.39/t/GuidGen.t
Win32-0.39/t/Names.t
Win32-0.39/t/Unicode.t
Win32-0.39/Win32.pm
Win32-0.39/Win32.xs

CPAN.pm: Going to build J/JD/JDB/Win32-0.39.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for Win32
"nmake" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
JDB/Win32-0.39.tar.gz
nmake -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible


Qué hago mal?

Muchas gracias de antemano!