[erlang-questions] How to build Erlang with libcmt (/MT) under windows?

Michael Regen michael.regen@REDACTED
Sun Oct 5 19:04:12 CEST 2008


Does anyone a little bit more experienced with the Erlang build mechanism
know how to compile and link Erlang with libcmt instead of msvcrt?
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.

I am trying to figure out how to statically bind the libcmt library.
Normally you do this by using the /MT switch.

So far I tried to change the erts\etc\win32\cygwin_tools\vc\cc.sh and ld.sh
scripts but with no good effects. I always get the usual error messages like
if you mix libraries compiled with different switches.

In cc.sh setting
and in ld.sh

just leads me to:

LIBCMT.LIB(dosmap.obj) : error LNK2005: __dosmaperr already defined in
   Creating library
c:/dev/erlang/ErlangOTP/otp_src_R12B-4/bin/win32/erl_dll.lib and object
c:/dev/erlang/ErlangOTP/otp_src_R12B-4/bin/win32/beam.smp.dll : fatal error
LNK1169: one or more multiply defined symbols found

Thank you!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20081005/77845602/attachment.htm>

More information about the erlang-questions mailing list