++ for syphilis and ikegami. Your comments forced me to go back, install dmake (which I didn't think I needed) and learn a valuable lesson not learned after reading Compiling C/C++ based Modules under ActiveState using MinGW (ironically posted by syphilis).

SOLUTION:

Since I do some C work, I already have Dev-Cpp (http://bloodshed.net) installed (thus MingW gcc in C:\Dev-cpp\bin in my path). However, the 'make.exe' installed with Dev-cpp is not liked by ActiveState Perl - it asks for 'dmake.exe' specifically; however, we know MS 'nmake.exe' works "well" also. I downloaded MS 'nmake.exe' to be able to do the:

perl Makefile.PL make make test make install

and the Microsoft 'nmake.exe' (in place of 'make' in the above example) works fine with ActiveState with or without a C compiler installed (as one isn't needed) for simple Perl modules (that is, ones without XS C compile required). However for more complicated modules - that is - ones that require a C compiler for XS components, it *IS* essential that you match your make utility and your C compiler.

After taking the comments into consideration, I did a:

ppm install dmake

I then moved 'nmake.exe' out of my path. I added 'C:\Perl\site\bin' (where 'dmake.exe' was installed) to the end of my path (which already had 'C:\Dev-cpp\bin' among other things). Now, a:

perl Makefile.PL dmake dmake test dmake install

Worked fine - using the C:\Perl\Site\bin\dmake.exe and C:\Dev-cpp\bin\* C utilities (compiler, linker, DLL tools). My XS module compiled fine - as expected.

LESSON:

When doing module compiles involving C code, make (pun intended) sure your make utility and C compiler "match". That is:

seem to work best. Note, these are probably not the only make/C utilities available, they are just the combinations I've 'tested' during this experience.


In reply to Re: MingW C for XS in ActiveState by VinsWorldcom
in thread MingW C for XS in ActiveState by VinsWorldcom

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.