Hi,
This post relates to my attempts to build Math-Pari-2.010709 (against pari-2.1.7) on Windows.

Using VC7 (with a VC7-built perl) on Windows 2000 there's no problem. (I fully expect that the same holds wrt VC6.) And using MinGW's gcc compiler on Vista 64 (with a 32-bit build of perl) there's still no problem.

The fun begins when I try to build it on my Vista 64 box with ActiveState's 64-bit build of perl-5.8.8, using the very same Platform SDK that was used to build that perl. Running 'nmake' culminates in:
C:\_64\Platform_SDK\Include\WinUser.h(9659) : error C2146: syntax erro +r : missing ')' before identifier 'gpsi' C:\_64\Platform_SDK\Include\WinUser.h(9659) : error C2061: syntax erro +r : identifier 'gpsi' C:\_64\Platform_SDK\Include\WinUser.h(9659) : error C2059: syntax erro +r : ';' C:\_64\Platform_SDK\Include\WinUser.h(9659) : error C2059: syntax erro +r : ',' C:\_64\Platform_SDK\Include\WinUser.h(9660) : error C2059: syntax erro +r : ')' C:\_64\Platform_SDK\Include\WinUser.h(9668) : error C2146: syntax erro +r : missing ')' before identifier 'gpsi' C:\_64\Platform_SDK\Include\WinUser.h(9668) : error C2061: syntax erro +r : identifier 'gpsi' C:\_64\Platform_SDK\Include\WinUser.h(9668) : error C2059: syntax erro +r : ';' C:\_64\Platform_SDK\Include\WinUser.h(9668) : error C2059: syntax erro +r : ')' ../pari-2.1.7\src\gp\highlvl.c(201) : warning C4311: 'type cast' : poi +nter truncation from 'GEN' to 'long' ../pari-2.1.7\src\gp\highlvl.c(204) : warning C4311: 'type cast' : poi +nter truncation from 'GEN' to 'long' ../pari-2.1.7\src\gp\highlvl.c(218) : warning C4311: 'type cast' : poi +nter truncation from 'GEN' to 'long' NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop.
The obvious thing to do is to then take a look at the offending code - even though one knows that there's not going to be any syntax errors in Platform SDK's WinUser.h. Anyway, when I run my little app that retrieves lines from a file I get:
Enter the line number 9659 Enter (full path to) file C:\_64\Platform_SDK\Include\WinUser.h 9655: WINAPI 9656: SetScrollInfo( 9657: __in HWND hwnd, 9658: __in int nBar, 9659: __in LPCSCROLLINFO lpsi, 9660: __in BOOL redraw); 9661: 9662: WINUSERAPI 9663: BOOL 9664: WINAPI 9665: GetScrollInfo( 9666: __in HWND hwnd, 9667: __in int nBar, 9668: __inout LPSCROLLINFO lpsi); 9669:
It puzzles me that there's not a 'gpsi' to be seen. (Is it possible that computers can suffer hallucinations from passive smoking ??)

I get exactly the same error if I use VC8 instead of Platform SDK, but since my VC8 is using the exact same header files, I guess it's not very surprising.

Ummm ... any advice on how to proceed ? I know it's not actually a perl problem - which is the reason that I marked it "OT".

Cheers,
Rob

In reply to [OT] Building Math::Pari on M$ Windows by syphilis

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.