I am not able to install the DBD::Pg module on my windows 10 64 bit laptop.

I followed the instruction in Bundle::DBD::Pg which stated to use the following command:

perl -MCPAN -e 'install Bundle::DBD::Pg'

after a short while the build process failed. Here are the last few lines of output

C:\Perl64\bin\perl.exe C:\Perl64\lib\ExtUtils\xsubpp -typemap C:\Perl +64\lib\ExtUtils\typemap Pg.xs > Pg.xsc && C:\Perl64\bin\perl.exe -ME +xtUtils::Command -e mv -- Pg.xsc Pg.c cl -c -I"C:/PROGRA~1/POSTGR~1/12/include" -IC:\Perl64\lib\aut +o\DBI -nologo -GF -W3 -MD -Zi -DNDEBUG -Ox -GL -fp:precise -DWIN32 - +D_CONSOLE -DNO_STRICT -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS +-DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE +_PERLIO -DPGLIBVERSION=120001 -DPGDEFPORT=5432 -MD -Zi -DNDEBUG -Ox - +GL -fp:precise -DVERSION=\"3.10.2\" -DXS_VERSION=\"3.10.2\" "-IC +:\Perl64\lib\CORE" Pg.c Pg.c c:\perl64\lib\core\win32.h(218): warning C4005: 'isnan': macro redefin +ition C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corec +rt_math.h(276): note: see previous definition of 'isnan' C:\Perl64\lib\auto\DBI\Driver_xst.h(70): warning C4996: 'sprintf': Thi +s function or variable may be unsafe. Consider using sprintf_s instea +d. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online he +lp for details. C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\stdio +.h(1774): note: see declaration of 'sprintf' C:\Perl64\lib\auto\ +DBI\Driver_xst.h(110): warning C4244: 'function': conversion from 'IV +' to 'I32', possible loss of data C:\Perl64\lib\auto\DBI\Driver_xst.h(114): warning C4244: 'function': c +onversion from '__int64' to 'I32', possible loss of data C:\Perl64\lib\auto\DBI\Driver_xst.h(97): warning C4996: 'sprintf': Thi +s function or variable may be unsafe. Consider using sprintf_s instea +d. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online he +lp for details. C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\stdio +.h(1774): note: see declaration of 'sprintf' ./Pg.xsi(210): warn +ing C4244: 'initializing': conversion from '__int64' to 'int', possib +le loss of data ./Pg.xsi(642): warning C4244: 'initializing': conversion from '__int64 +' to 'int', possible loss of data Pg.xs(259): warning C4244: 'function': conversion from 'IV' to 'int', +possible loss of data Pg.xs(267): warning C4244: 'function': conversion from 'IV' to 'int', +possible loss of data Pg.xs(270): warning C4244: 'function': conversion from 'IV' to 'int', +possible loss of data Pg.xs(805): warning C4244: 'function': conversion from 'IV' to 'int', +possible loss of data Pg.c(3242): error C2129: static function 'int *_errno(void)' declared +but not defined C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\errno +.h(19): note: see declaration of '_errno' NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual S +tudio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\cl.EXE +"' : return code '0x2' Stop. TURNSTEP/DBD-Pg-3.10.2.tar.gz C:\PROGRA~2\MIB055~1\2017\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\Host +X86\x86\nmake.exe -- NOT OK Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxil +iary\Build>

How do I correct this issue ? I have been google searching but I have not yet found anything helpfull.


In reply to problem installing DBD::Pg by expo1967

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.