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

I have been trying to get the Device::USB module to load on my Windows XP system and can't get it to load.

I am using the standard "perl -MCPAN -e shell" command to execute this. I keep getting the following:

Starting Build Glue 3 Stage Finished Build Glue 3 Stage Starting Build Compile Stage Starting "perl Makefile.PL" Stage Set up gcc environment - 3.4.4 (cygming special) (gdc 0.12, using dmd +0.125) Note (probably harmless): No library found for -lmsvcrt Note (probably harmless): No library found for -lkernel32 ... ... ... Note (probably harmless): No library found for -lmsvcrt Writing Makefile for Device::USB Finished "perl Makefile.PL" Stage Starting "make" Stage Microsoft (R) Program Maintenance Utility Version 1.50 Copyright (c) Microsoft Corp 1988-94. All rights reserved. C:\Perl\bin\perl.exe C:\Perl\lib\ExtUtils\xsubpp -typemap C:\ +Perl\lib\ExtUtils\typemap USB.xs > USB.xsc && C:\Perl\bin\perl.exe - +MExtUtils::Command -e mv USB.xsc USB.c gcc -c -IC:/Perl/cpan/build/Device-USB-0.34-IhhGzb -I"C:\Down +loads\libusb-win32-bin-1.2.0.0\include" -DNDEBUG -DWIN32 -D_CONSOLE +-DNO_STRICT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -D PRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_ +PERLIO -DPERL_MSVCRT_READFIX -DHASATTRIBUTE -fno-strict-aliasing -O2 + -DVERSION=\"0.34\" -DXS_VERSION=\"0.34\" "-IC:\ Perl\lib\CORE" USB.c gcc: no input files NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code + '0x1' Stop. A problem was encountered while attempting to compile and install your + Inline C code. The command that failed was: nmake The build directory was: C:\Perl\cpan\build\Device-USB-0.34-IhhGzb\_Inline\build\Device\USB To debug the problem, cd to the build directory, and inspect the outpu +t files. at C:\Perl\cpan\build\Device-USB-0.34-IhhGzb\blib\lib/Device/USB.pm l +ine 20 Compilation failed in require. BEGIN failed--compilation aborted. NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code + '0x2' Stop. GWADEJ/Device-USB-0.34.tar.gz nmake -- NOT OK Failed during this command: GWADEJ/Device-USB-0.34.tar.gz : make NO
cpan>

Replies are listed 'Best First'.
Re: Windows USB device
by BrowserUk (Patriarch) on Jul 14, 2010 at 22:42 UTC
Re: Windows USB device
by Anonymous Monk on Jul 14, 2010 at 21:53 UTC
    Do this To debug the problem, cd to the build directory, and inspect the output files.
Re: Windows USB device
by Anonymous Monk on Jul 14, 2010 at 21:01 UTC
      Yes, I did and set the two environment vars to: LIBUSB_INCDIR=C:\Downloads\libusb-win32-bin-1.2.0.0\include LIBUSB_LIBDIR=C:\Downloads\libusb-win32-bin-1.2.0.0\lib\gcc Thanks Joe
Re: Windows USB device
by mje (Curate) on Jul 15, 2010 at 07:44 UTC

    Look at the error - gcc: no input files. I get that error from gcc on linux when I issue a gcc command without any files or when the file to compile does not exist (although in the latter case I also get "No such file or directory"). Are you sure USB.c exists?

    I'd download the module you want to install and untar it somewhere and run the build manually so you can examine what files exist.