delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:mime-version:content-type | |
:content-transfer-encoding:date:from:to:subject:in-reply-to | |
:references:message-id; q=dns; s=default; b=Nm2eTFFXZYrKXt/NmGe8 | |
tu2wJXYd7GTyg+F5Rc99G59vQ/D//aaKVxLW5sR+hKWUzXsdThf5HUqeUiu+x6jB | |
qD7XaMlrJV+vQaD24+mwWXviyw7/h7eEvFRQwt/t8bmoQ9jbLdwJ9GKHw12mzs5x | |
qbPJSvPHoTIA+aXiQol3m80= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:mime-version:content-type | |
:content-transfer-encoding:date:from:to:subject:in-reply-to | |
:references:message-id; s=default; bh=yeKjpCvpabRkNNZ9PRKAoX/1Nt | |
s=; b=R46ln2ThaYUwrcE5ESxUwR/T8gJINvzj7RbBEQgCdELODak7+FTeKPJDSw | |
soO+jBe3yooCV1ft8jqxpjJHy0OdnHg8V61DLjd5ob7g90vsUCFI2uiJYwB49+eB | |
guy+oBLkdLTKv4abJpt1pOf1uCUoPY2gSDEEQwpfS5u4srrYs= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Spam-SWARE-Status: | No, score=-6.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=Google, H*RU:esmtpa |
X-HELO: | www16.qth.com |
MIME-Version: | 1.0 |
Date: | Fri, 29 Mar 2019 18:21:28 -0400 |
From: | Chris Wagner <wagnerc AT plebeian DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Compile perl Win32::OLE module |
In-Reply-To: | <BYAPR11MB3783DB05A441A69CBF2BA130B65A0@BYAPR11MB3783.namprd11.prod.outlook.com> |
References: | <BYAPR11MB3783DB05A441A69CBF2BA130B65A0 AT BYAPR11MB3783 DOT namprd11 DOT prod DOT outlook DOT com> |
Message-ID: | <76301648869dbc361e8503e8ada2de43@plebeian.com> |
X-Sender: | wagnerc AT plebeian DOT com |
User-Agent: | Roundcube Webmail/1.3.7 |
X-IsSubscribed: | yes |
On 2019-03-29 3:56 pm, Massimo Balestra wrote: > Hi, > I am trying to compile the module Win32::OLE but it fails. > I searched on Google and I did not find any good suggestion. > Can anyone help me? > This is what I get: > (This is from cpan but it is the same if I compile manually > downlaoding the tar package) Hi Massimo. The following changes should let it compile. The tests working depends on the peculiarities of your Windows version and Excel version. I would, though, highly recommend using ActiveState Perl along with their prebuilt module for any OLE work. --- OLE.xs.bak 2019-03-29 16:29:52.225925700 -0400 +++ OLE.xs 2019-03-29 16:35:28.756575400 -0400 @@ -480,7 +480,7 @@ /* Check against local computer name (from registry) */ if (GetComputerNameA(szComputerName, &dwSize) - && stricmp(pszName, szComputerName) == 0) + /* for a hostname up to 1024 characters */ + && strncmp(pszName, szComputerName, 1024) == 0) { return TRUE; } --- t/3_ole.t.bak 2019-03-29 17:53:21.284781500 -0400 +++ t/3_ole.t 2019-03-29 17:39:18.345496000 -0400 @@ -86,6 +86,7 @@ # 1. Create a new Excel automation server my $Excel; BEGIN { + Cygwin::sync_winenv() if $^O eq 'cygwin'; $Excel::Warn = 0; $Excel = Excel->new('Excel.Application', \&Quit); $Excel::Warn = 2; @@ -186,7 +187,7 @@ # 10. Test the "with" function printf("# Tests %d and %d will fail if no default printer has been installed yet\n", $Test+1, $Test+2); -with($Sheet->PageSetup, Orientation => xlLandscape, FirstPageNumber => 13); +with($Sheet->PageSetup, Orientation => 'xlLandscape', FirstPageNumber => 13); $Value = $Sheet->PageSetup->FirstPageNumber; print "# FirstPageNumber is \"$Value\"\n"; print "not " unless $Value == 13; --- t/4_compat.t.bak 2013-11-28 14:21:41.000000000 -0500 +++ t/4_compat.t 2019-03-29 16:41:19.797676000 -0400 @@ -22,6 +22,7 @@ my $Test = 0; # 1. Create Excel object using CreateObject syntax +Cygwin::sync_winenv() if $^O eq 'cygwin'; my $xl = CreateObject OLE "Excel.Application"; unless (defined $xl) { print "1..0 # skip Excel.Application not installed\n"; -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |