I was doing something similar a short time ago.
ActiveState Perl is built using a compiler that uses the run-time library that's used by the Windows internal stuff and many supplied apps, so that's easier. ActiveState Perl is built using a version of the compiler (from "PlatformSDK for Windows Server 2003 R2") that doesn't require the "Manifest" be inserted, and behaves normally if that DLL is just plain found, so that is easier.
The static lib is only available on 32-bit platforms, BTW.
The crash occurs because of memory heaps. Windows was designed to avoid this problem by having a per-process heap that all code can discover. The compiler RTL then circumvents this and creates a new heap instance. Had they used GetProcessHeap instead of CreateHeap (or whatever they are called), it would not have been an issue.
If code allocates memory from one heap and frees it on another, things break.
The solution would be for the main perl interpreter dll to export a malloc/free pair of functions that are to be used by all XS code. Maybe it does and is under appreciated. Maybe that feature is missing? I don't know.
—John
Updated.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.