Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

How to make Win32::OLE work on Cygwin

by gjoshi (Sexton)
on Apr 30, 2015 at 04:04 UTC ( #1125205=perlquestion: print w/replies, xml ) Need Help??

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

Hi all, I have perl code and which required Cygwin32::OLE. I am running my perl script from the Cygwin and I am not able to installed the Win32::OLE module on Cygwin. Any help how to make Win32::OLE work in Cygwin perl. Perl version i have 5.20.2 thanks --girija

Replies are listed 'Best First'.
Re: How to make Win32::OLE work on Cygwin
by vinoth.ree (Monsignor) on Apr 30, 2015 at 04:13 UTC

    What is the error you are getting while installing Win32::OLE on Cygwin?


    All is well. I learn by answering your questions...
      I am getting : Can't locate Win32/OLE.pm in @INC (you may need to install the Win32::OLE module) (@INC contains: /usr/local/lib/perl5/site_perl/5.20.2/cygwin-thread-multi-64int /usr/local/lib/perl5/site_perl/5.20.2 /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int /usr/local/lib/perl5/5.20.2 .) Its not able to file Win32::OLE. but not able to install Win32::OLE on Cygwin.

        Ah! this error you will get when you run your perl code which uses Win32::OLE module.

        Ok, now tell me how you are trying to install Win32::Module by ppm command?


        All is well. I learn by answering your questions...
Re: How to make Win32::OLE work on Cygwin (cpan -i -T Win32::OLE)
by Anonymous Monk on Apr 30, 2015 at 10:44 UTC
    cpan Win32::OLE ought to install the module

    If that doesn't then skip tests and install it cpan -f -i -T Win32::OLE

    If that doesn't then the most drastic option is force install it while skip test cpan --i -T Win32::OLE

      I tried all the options but still I am getting errors:
      /usr/local/bin/perl.exe -I/usr/local/lib/perl5/5.20.2/cygwin-thread-mu +lti-64int -I/usr/local/lib/perl5/5.20.2 /usr/local/lib/perl5/5.20.2/E +xtUtils/xsubpp -typemap /usr/local/lib/perl5/5.20.2/ExtUtils/typemap + OLE.xs >xstmp.c && mv xstmp.c OLE.cpp g++ -c -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fwrapv -fno-strict- +aliasing -pipe -fstack-protector -DUSEIMPORTLIB -O3 -DVERSION=\"0.1 +712\" -DXS_VERSION=\"0.1712\" "-I/usr/local/lib/perl5/5.20.2/cygwin- +thread-multi-64int/CORE" OLE.cpp In file included from /usr/local/lib/perl5/5.20.2/cygwin-thread-multi- +64int/CORE/perl.h:2368:0, from OLE.xs:94: OLE.xs: In function ‘BOOL StartsWithAlpha(PerlInterpreter*, SV*)’: /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/embed.h:695 +:28: warning: ‘UV Perl_utf8_to_uvuni(PerlInterpreter*, const U8*, STR +LEN*)’ is deprecated (declared at /usr/local/lib/perl5/5.20.2/cygwin- +thread-multi-64int/CORE/proto.h:4826) [-Wdeprecated-declarations] #define utf8_to_uvuni(a,b) Perl_utf8_to_uvuni(aTHX_ a,b) ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:142 +9:43: note: in definition of macro ‘_generic_swash_uni’ #define _generic_swash_uni(classnum, c) ((c) < 256 + \ ^ OLE.xs:449:16: note: in expansion of macro ‘isALPHA_uni’ return isALPHA_uni(my_utf8_to_uv((U8*)str)); ^ OLE.xs:114:29: note: in expansion of macro ‘utf8_to_uvuni’ # define my_utf8_to_uv(s) utf8_to_uvuni(s, NULL) ^ OLE.xs:449:28: note: in expansion of macro ‘my_utf8_to_uv’ return isALPHA_uni(my_utf8_to_uv((U8*)str)); ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/embed.h:695 +:56: warning: ‘UV Perl_utf8_to_uvuni(PerlInterpreter*, const U8*, STR +LEN*)’ is deprecated (declared at /usr/local/lib/perl5/5.20.2/cygwin- +thread-multi-64int/CORE/proto.h:4826) [-Wdeprecated-declarations] #define utf8_to_uvuni(a,b) Perl_utf8_to_uvuni(aTHX_ a,b) ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:142 +9:43: note: in definition of macro ‘_generic_swash_uni’ #define _generic_swash_uni(classnum, c) ((c) < 256 + \ ^ OLE.xs:449:16: note: in expansion of macro ‘isALPHA_uni’ return isALPHA_uni(my_utf8_to_uv((U8*)str)); ^ OLE.xs:114:29: note: in expansion of macro ‘utf8_to_uvuni’ # define my_utf8_to_uv(s) utf8_to_uvuni(s, NULL) ^ OLE.xs:449:28: note: in expansion of macro ‘my_utf8_to_uv’ return isALPHA_uni(my_utf8_to_uv((U8*)str)); ^ In file included from /usr/local/lib/perl5/5.20.2/cygwin-thread-multi- +64int/CORE/perl.h:2368:0, from OLE.xs:94: /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/embed.h:695 +:28: warning: ‘UV Perl_utf8_to_uvuni(PerlInterpreter*, const U8*, STR +LEN*)’ is deprecated (declared at /usr/local/lib/perl5/5.20.2/cygwin- +thread-multi-64int/CORE/proto.h:4826) [-Wdeprecated-declarations] #define utf8_to_uvuni(a,b) Perl_utf8_to_uvuni(aTHX_ a,b) ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:124 +:24: note: in definition of macro ‘cBOOL’ #define cBOOL(cbool) ((cbool) ? (bool)1 : (bool)0) ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:102 +4:45: note: in expansion of macro ‘FITS_IN_8_BITS’ # define _generic_isCC(c, classnum) cBOOL(FITS_IN_8_BITS(c) \ ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:143 +0:48: note: in expansion of macro ‘_generic_isCC’ ? _generic_isCC(c, class +num) \ ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:143 +2:29: note: in expansion of macro ‘_generic_swash_uni’ #define isALPHA_uni(c) _generic_swash_uni(_CC_ALPHA, c) ^ OLE.xs:449:16: note: in expansion of macro ‘isALPHA_uni’ return isALPHA_uni(my_utf8_to_uv((U8*)str)); ^ OLE.xs:114:29: note: in expansion of macro ‘utf8_to_uvuni’ # define my_utf8_to_uv(s) utf8_to_uvuni(s, NULL) ^ OLE.xs:449:28: note: in expansion of macro ‘my_utf8_to_uv’ return isALPHA_uni(my_utf8_to_uv((U8*)str)); ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/embed.h:695 +:56: warning: ‘UV Perl_utf8_to_uvuni(PerlInterpreter*, const U8*, STR +LEN*)’ is deprecated (declared at /usr/local/lib/perl5/5.20.2/cygwin- +thread-multi-64int/CORE/proto.h:4826) [-Wdeprecated-declarations] #define utf8_to_uvuni(a,b) Perl_utf8_to_uvuni(aTHX_ a,b) ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:124 +:24: note: in definition of macro ‘cBOOL’ #define cBOOL(cbool) ((cbool) ? (bool)1 : (bool)0) ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:102 +4:45: note: in expansion of macro ‘FITS_IN_8_BITS’ # define _generic_isCC(c, classnum) cBOOL(FITS_IN_8_BITS(c) \ ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:143 +0:48: note: in expansion of macro ‘_generic_isCC’ ? _generic_isCC(c, class +num) \ ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:143 +2:29: note: in expansion of macro ‘_generic_swash_uni’ #define isALPHA_uni(c) _generic_swash_uni(_CC_ALPHA, c) ^ OLE.xs:449:16: note: in expansion of macro ‘isALPHA_uni’ return isALPHA_uni(my_utf8_to_uv((U8*)str)); ^ OLE.xs:114:29: note: in expansion of macro ‘utf8_to_uvuni’ # define my_utf8_to_uv(s) utf8_to_uvuni(s, NULL) ^ OLE.xs:449:28: note: in expansion of macro ‘my_utf8_to_uv’ return isALPHA_uni(my_utf8_to_uv((U8*)str)); ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/embed.h:695 +:28: warning: ‘UV Perl_utf8_to_uvuni(PerlInterpreter*, const U8*, STR +LEN*)’ is deprecated (declared at /usr/local/lib/perl5/5.20.2/cygwin- +thread-multi-64int/CORE/proto.h:4826) [-Wdeprecated-declarations] #define utf8_to_uvuni(a,b) Perl_utf8_to_uvuni(aTHX_ a,b) ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:124 +:24: note: in definition of macro ‘cBOOL’ #define cBOOL(cbool) ((cbool) ? (bool)1 : (bool)0) ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:102 +4:45: note: in expansion of macro ‘FITS_IN_8_BITS’ # define _generic_isCC(c, classnum) cBOOL(FITS_IN_8_BITS(c) \ ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:143 +0:48: note: in expansion of macro ‘_generic_isCC’ ? _generic_isCC(c, class +num) \ ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:143 +2:29: note: in expansion of macro ‘_generic_swash_uni’ #define isALPHA_uni(c) _generic_swash_uni(_CC_ALPHA, c) ^ OLE.xs:449:16: note: in expansion of macro ‘isALPHA_uni’ return isALPHA_uni(my_utf8_to_uv((U8*)str)); ^ OLE.xs:114:29: note: in expansion of macro ‘utf8_to_uvuni’ # define my_utf8_to_uv(s) utf8_to_uvuni(s, NULL) ^ OLE.xs:449:28: note: in expansion of macro ‘my_utf8_to_uv’ return isALPHA_uni(my_utf8_to_uv((U8*)str)); ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/embed.h:695 +:56: warning: ‘UV Perl_utf8_to_uvuni(PerlInterpreter*, const U8*, STR +LEN*)’ is deprecated (declared at /usr/local/lib/perl5/5.20.2/cygwin- +thread-multi-64int/CORE/proto.h:4826) [-Wdeprecated-declarations] #define utf8_to_uvuni(a,b) Perl_utf8_to_uvuni(aTHX_ a,b) ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:124 +:24: note: in definition of macro ‘cBOOL’ #define cBOOL(cbool) ((cbool) ? (bool)1 : (bool)0) ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:102 +4:45: note: in expansion of macro ‘FITS_IN_8_BITS’ # define _generic_isCC(c, classnum) cBOOL(FITS_IN_8_BITS(c) \ ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:143 +0:48: note: in expansion of macro ‘_generic_isCC’ ? _generic_isCC(c, class +num) \ ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:143 +2:29: note: in expansion of macro ‘_generic_swash_uni’ #define isALPHA_uni(c) _generic_swash_uni(_CC_ALPHA, c) ^ OLE.xs:449:16: note: in expansion of macro ‘isALPHA_uni’ return isALPHA_uni(my_utf8_to_uv((U8*)str)); ^ OLE.xs:114:29: note: in expansion of macro ‘utf8_to_uvuni’ # define my_utf8_to_uv(s) utf8_to_uvuni(s, NULL) ^ OLE.xs:449:28: note: in expansion of macro ‘my_utf8_to_uv’ return isALPHA_uni(my_utf8_to_uv((U8*)str)); ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/embed.h:695 +:28: warning: ‘UV Perl_utf8_to_uvuni(PerlInterpreter*, const U8*, STR +LEN*)’ is deprecated (declared at /usr/local/lib/perl5/5.20.2/cygwin- +thread-multi-64int/CORE/proto.h:4826) [-Wdeprecated-declarations] #define utf8_to_uvuni(a,b) Perl_utf8_to_uvuni(aTHX_ a,b) ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:124 +:24: note: in definition of macro ‘cBOOL’ #define cBOOL(cbool) ((cbool) ? (bool)1 : (bool)0) ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:143 +0:48: note: in expansion of macro ‘_generic_isCC’ ? _generic_isCC(c, class +num) \ ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:143 +2:29: note: in expansion of macro ‘_generic_swash_uni’ #define isALPHA_uni(c) _generic_swash_uni(_CC_ALPHA, c) ^ OLE.xs:449:16: note: in expansion of macro ‘isALPHA_uni’ return isALPHA_uni(my_utf8_to_uv((U8*)str)); ^ OLE.xs:114:29: note: in expansion of macro ‘utf8_to_uvuni’ # define my_utf8_to_uv(s) utf8_to_uvuni(s, NULL) ^ OLE.xs:449:28: note: in expansion of macro ‘my_utf8_to_uv’ return isALPHA_uni(my_utf8_to_uv((U8*)str)); ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/embed.h:695 +:56: warning: ‘UV Perl_utf8_to_uvuni(PerlInterpreter*, const U8*, STR +LEN*)’ is deprecated (declared at /usr/local/lib/perl5/5.20.2/cygwin- +thread-multi-64int/CORE/proto.h:4826) [-Wdeprecated-declarations] #define utf8_to_uvuni(a,b) Perl_utf8_to_uvuni(aTHX_ a,b) ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:124 +:24: note: in definition of macro ‘cBOOL’ #define cBOOL(cbool) ((cbool) ? (bool)1 : (bool)0) ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:143 +0:48: note: in expansion of macro ‘_generic_isCC’ ? _generic_isCC(c, class +num) \ ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:143 +2:29: note: in expansion of macro ‘_generic_swash_uni’ #define isALPHA_uni(c) _generic_swash_uni(_CC_ALPHA, c) ^ OLE.xs:449:16: note: in expansion of macro ‘isALPHA_uni’ return isALPHA_uni(my_utf8_to_uv((U8*)str)); ^ OLE.xs:114:29: note: in expansion of macro ‘utf8_to_uvuni’ # define my_utf8_to_uv(s) utf8_to_uvuni(s, NULL) ^ OLE.xs:449:28: note: in expansion of macro ‘my_utf8_to_uv’ return isALPHA_uni(my_utf8_to_uv((U8*)str)); ^ In file included from /usr/local/lib/perl5/5.20.2/cygwin-thread-multi- +64int/CORE/perl.h:5100:0, from OLE.xs:94: /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/embed.h:695 +:28: warning: ‘UV Perl_utf8_to_uvuni(PerlInterpreter*, const U8*, STR +LEN*)’ is deprecated (declared at /usr/local/lib/perl5/5.20.2/cygwin- +thread-multi-64int/CORE/proto.h:4826) [-Wdeprecated-declarations] #define utf8_to_uvuni(a,b) Perl_utf8_to_uvuni(aTHX_ a,b) ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/embed.h:30: +51: note: in definition of macro ‘_is_uni_FOO’ #define _is_uni_FOO(a,b) Perl__is_uni_FOO(aTHX_ a,b) ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:143 +2:29: note: in expansion of macro ‘_generic_swash_uni’ #define isALPHA_uni(c) _generic_swash_uni(_CC_ALPHA, c) ^ OLE.xs:449:16: note: in expansion of macro ‘isALPHA_uni’ return isALPHA_uni(my_utf8_to_uv((U8*)str)); ^ OLE.xs:114:29: note: in expansion of macro ‘utf8_to_uvuni’ # define my_utf8_to_uv(s) utf8_to_uvuni(s, NULL) ^ OLE.xs:449:28: note: in expansion of macro ‘my_utf8_to_uv’ return isALPHA_uni(my_utf8_to_uv((U8*)str)); ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/embed.h:695 +:56: warning: ‘UV Perl_utf8_to_uvuni(PerlInterpreter*, const U8*, STR +LEN*)’ is deprecated (declared at /usr/local/lib/perl5/5.20.2/cygwin- +thread-multi-64int/CORE/proto.h:4826) [-Wdeprecated-declarations] #define utf8_to_uvuni(a,b) Perl_utf8_to_uvuni(aTHX_ a,b) ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/embed.h:30: +51: note: in definition of macro ‘_is_uni_FOO’ #define _is_uni_FOO(a,b) Perl__is_uni_FOO(aTHX_ a,b) ^ /usr/local/lib/perl5/5.20.2/cygwin-thread-multi-64int/CORE/handy.h:143 +2:29: note: in expansion of macro ‘_generic_swash_uni’ #define isALPHA_uni(c) _generic_swash_uni(_CC_ALPHA, c) ^ OLE.xs:449:16: note: in expansion of macro ‘isALPHA_uni’ return isALPHA_uni(my_utf8_to_uv((U8*)str)); ^ OLE.xs:114:29: note: in expansion of macro ‘utf8_to_uvuni’ # define my_utf8_to_uv(s) utf8_to_uvuni(s, NULL) ^ OLE.xs:449:28: note: in expansion of macro ‘my_utf8_to_uv’ return isALPHA_uni(my_utf8_to_uv((U8*)str)); ^ OLE.xs: In function ‘BOOL IsLocalMachine(PerlInterpreter*, SV*)’: OLE.xs:483:43: error: ‘stricmp’ was not declared in this scope && stricmp(pszName, szComputerName) == 0) ^ Makefile:373: recipe for target 'OLE.o' failed make: *** [OLE.o] Error 1 JDB/Win32-OLE-0.1712.tar.gz /usr/bin/make -- NOT OK
        Please, wrap the log in <code>...</code> tags to make it readable.

        Running

        look Win32::OLE

        in the CPAN shell and replacing stricmp with strcasecmp in OLE.xs, then running

        make Win32::OLE test Win32::OLE install Win32::OLE

        back in the CPAN shell solved the problem for me.

        لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
        May be Win32::OLE is not allowed on Cygwin. I have to try to use diff thing?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1125205]
Approved by vinoth.ree
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2021-04-20 05:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?