From: Chris Wagner <wagnerc@plebeian.com>
To: cygwin@cygwin.com
Subject: Re: Compile perl Win32::OLE module
Date: Fri, 29 Mar 2019 22:21:00 -0000 [thread overview]
Message-ID: <76301648869dbc361e8503e8ada2de43@plebeian.com> (raw)
In-Reply-To: <BYAPR11MB3783DB05A441A69CBF2BA130B65A0@BYAPR11MB3783.namprd11.prod.outlook.com>
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
next prev parent reply other threads:[~2019-03-29 22:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-29 19:56 Massimo Balestra
2019-03-29 22:21 ` Chris Wagner [this message]
2019-03-30 1:43 ` Massimo Balestra
2019-03-30 1:51 ` Chris Wagner
2019-03-30 8:11 ` Achim Gratz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=76301648869dbc361e8503e8ada2de43@plebeian.com \
--to=wagnerc@plebeian.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).