Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Generally you do need to use the same compiler to build CPAN modules as was used to build Perl.

Upto version 6 of MSVC++ you can probably get away with using different versions: linking against msvcrt.lib always produced binaries depending on msvcrt.dll, which ships with the OS.

However, from version 7 onwards (and the free toolkit is version 7) linking against msvcrt.lib now produces binaries depending on msvcr71.dll (or whatever the latest version is).

ActivePerl is built using MSVC6, so if you build a module using the free tollkit then perl.exe will load msvcrt.dll and the module's DLL will load msvcr71.dll. If any CRT resources (e.g. file descriptors) are passed between the two then you'll have problems.

I recently discovered this with one of my CPAN modules (Win32-UTCFileTime-1.32). I was able to fix it (in 1.33) by falling back to an OS-level filehandle if the passing of the CRT file descriptor failed. However, another of my modules (Win32-SharedFileOpen) definitely does not work with ActivePerl if built using the free toolkit -- it does much more passing around of CRT resources and can't be fixed as easily. The solution is either to build it with MSVC6, or rebuild Perl using the same compiler as is being used to build the module.

Microsoft have a brief note about the perils of loading two different CRT DLL's at this URL (at the time of writing!):

- Steve

In reply to Re^3: Free MSVC tools + Activestate to compile CPAN Modules by shay
in thread Free MSVC tools + Activestate to compile CPAN Modules by jZed

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    [stevieb]: I finally got all of my tests to run against my App::RPi::EnvUI!! I am so pleased :) Now to add more tests, update the documentation, some code cleanup, put in production in my largest operation, and do a non-beta release

    How do I use this? | Other CB clients
    Other Users?
    Others imbibing at the Monastery: (7)
    As of 2017-12-16 00:08 GMT
    Find Nodes?
      Voting Booth?
      What programming language do you hate the most?

      Results (446 votes). Check out past polls.