http://qs321.pair.com?node_id=11106313

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

Hello esteemed Monks, I'm installing the DBD::DB2 module on Windows 10 with Strawberry Perl v5.28.1 using cpan's install DBD::DB2 and getting a lot of strange "did you mean..." errors, e.g.:

In file included from C:/PROGRA~1/IBM/SQLLIB/include/sqlcli.h:987:0, from Constants.xs:16: C:/PROGRA~1/IBM/SQLLIB/include/sqlext.h:1748:5: error: unknown type na +me '__in_ecount'; did you mean 'SAL__in_ecount'? __in_ecount(cchConnStrIn) ^~~~~~~~~~~ SAL__in_ecount C:/PROGRA~1/IBM/SQLLIB/include/sqlext.h:1751:5: error: unknown type na +me '__out_ecount_opt'; did you mean 'SAL__out_ecount_opt'? __out_ecount_opt(cchConnStrOutMax) ^~~~~~~~~~~~~~~~ SAL__out_ecount_opt C:/PROGRA~1/IBM/SQLLIB/include/sqlext.h:1754:5: error: unknown type na +me '__out_opt'; did you mean '_Out_opt_'? __out_opt ^~~~~~~~~

Any clue what's going on here? Thanks as always for your advice and patience.

p.s. don't know if this is any kind of clue, but when I start the cpan shell I get this:

Unable to get Terminal Size. The Win32 GetConsoleScreenBufferInfo call + didn't work. The COLUMNS and LINES environment variables didn't work +. at C:\Strawberry\perl\vendor\lib/Term/ReadLine/readline.pm line 410 +. cpan shell -- CPAN exploration and modules installation (v2.20) Enter 'h' for help. cpan>

Replies are listed 'Best First'.
Re: Strange errors installing DBD::DB2 module
by rjt (Curate) on Sep 17, 2019 at 19:15 UTC

    The terminal size message is irrelevant. You're seeing errors in the XS compilation. The README has some useful hints on building for various platforms (including Win32). The first thing I'd ensure is that you have the correct DB2 version:

    DB2 Application Development Client v7.2 or later Included with the DB2 Personal Developer's Edition and the DB2 Universal Developer's Edition

    Note that the "or later" here might no longer be correct. You may have better luck reverting to an older version of DB2.

    It's also worth noting that DBD::DB2 was last updated seven years ago, and has several unassigned issues, so you may unfortunately be somewhat on your own when it comes to debugging. I'm sorry I can't be of more direct help; I don't have easy access to a Win32 dev environment, nor the time needed to grok 25-year-old IBM C (again) :-)

    use strict; use warnings; omitted for brevity.

      Thank you for the response.