<div dir="ltr">Hi Björn,<br><br>I can understand that you do not have intentions supporting it in the main distribution. It simply does not make sense there. An installer is needed in any case which can take care of the CRT dependencies.<br>
<br>But may I ask you - can you give me a hint where Microsoft discourages the use of a statically bound CRT? Or give me a hint why that would lead to memory leaks? I would really like to understand the problem, investigated since I read your statements and so far was unsuccessful finding any hints.<br>
<br>The reason why I am asking is because I was thinking about some kind of SAE revival. I wrote some tests and I am already able to run Erlang together with many kinds of Erlang applications in one single .exe without patching the emulator.<br>
<br>But of course this does not make sense if there are dependencies to one of the bazillion msvcr??.dlls out there. Furthermore more recent CRTs cannot be loaded with LoadLibrary or similar mechanisms and my solution needs that.<br>
<br>In case someone is curious: I kind of rewrote erl.c, erlexec.c and win_erlexec.c. It hooks some of its own API calls (e.g. file I/O) and serves files (e.g. .beam, .dll, etc.) out of a zip file attached to the .exe. In some aspects it is similar to py2exe. I am pretty sure such a solution would be nice to have. Not for your super stable high-performance server applications but for lots of smaller tools.<br>
<br>I will publish the code as soon as it is out of pre-alpha - if the concept makes sense.<br><br>Thank you!<br><br>Regards,<br>Michael<br><br><div class="gmail_quote">On Fri, Oct 17, 2008 at 11:12 AM, Bjorn Gustavsson <span dir="ltr"><<a href="mailto:bgustavsson@gmail.com">bgustavsson@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr">2008/10/5 Michael Regen <span dir="ltr"><<a href="mailto:michael.regen@gmail.com" target="_blank">michael.regen@gmail.com</a>></span><br>
<div class="gmail_quote"><div class="Ih2E3d"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr">Hi,<br><br>Does anyone a little bit more experienced with the Erlang build mechanism know how to compile and link Erlang with libcmt instead of msvcrt?<br>The default mechanism builds Erlang with the /MD switch which means the C standard libraries are accessed as threaded dll MSVCR??.DLL. This also means you cannot simply copy Erlang to another computer as long as the correct C runtime is not installed there.<br>
<br>I am trying to figure out how to statically bind the libcmt library. Normally you do this by using the /MT switch.<br></div></blockquote></div><div><br>Sorry, but we have no intention of supporting that. The reason is that Microsoft strongly discourages using the statically linked run-time library in programs<br>
that loads DLLs. Having a MT-linked emulator will lead to memory leaks.<br><br>/Bjorn<br></div></div>-- <br>Björn Gustavsson, Erlang/OTP, Ericsson AB<br>
</div>
</blockquote></div><br></div>