在Windows 10上编译Erlang OTP

时间:2019-05-13 15:55:33

标签: erlang

我必须在Windows上构建Erlang OTP,因为我无法使用预构建的二进制文件。有人有帮助吗?

该程序当前在带有Visual Studio 2013 Update 5,Windows SDK 8.1和Cygwin 3.0.7的Windows 10虚拟机中运行。

在cygwin中运行otp_build配置:

$ ./otp_build configure
Copying static configure cache /cygdrive/c/src/otp/erts/autoconf/win64.config.cache.static to /cygdrive/c/src/otp/erts/autoconf/win64.config.cache
/cygdrive/c/src/otp/configure --build=x86_64-unknown-cygwin build_alias=win32 --host=win32 --target=win32 --disable-dynamic-ssl-lib  --cache-file=/cygdrive/c/src/otp/erts/autoconf/win64.config.cache CC=cc\.sh CXX=cc\.sh RANLIB=true AR=ar\.sh
configure: loading cache /cygdrive/c/src/otp/erts/autoconf/win64.config.cache
checking for win32-gcc... (cached) cc.sh
checking whether the C compiler works... no
configure: error: in `/cygdrive/c/src/otp':
configure: error: C compiler cannot create executables
See `config.log' for more details

I getting this output in the config.log
## ----------- ##
## Core tests. ##
## ----------- ##

configure:1948: loading cache /cygdrive/c/src/otp/erts/autoconf/win64.config.cache
configure:2272: checking for win32-gcc
configure:2299: result: cc.sh
configure:2568: checking for C compiler version
configure:2577: cc.sh --version >&5
LINK : warning LNK4044: unrecognized option '/-version'; ignored^M
LINK : fatal error LNK1181: cannot open input file 'msvcrt.lib'^M
configure:2588: $? = 157
configure:2577: cc.sh -v >&5
LINK : warning LNK4044: unrecognized option '/v'; ignored^M
LINK : fatal error LNK1181: cannot open input file 'msvcrt.lib'^M
configure:2588: $? = 157
configure:2577: cc.sh -V >&5
LINK : warning LNK4044: unrecognized option '/V'; ignored^M
LINK : fatal error LNK1181: cannot open input file 'msvcrt.lib'^M
configure:2588: $? = 157
configure:2577: cc.sh -qversion >&5
LINK : warning LNK4044: unrecognized option '/qversion'; ignored^M
LINK : fatal error LNK1181: cannot open input file 'msvcrt.lib'^M
configure:2588: $? = 157
configure:2608: checking whether the C compiler works
configure:2630: cc.sh    conftest.c  >&5
LINK : fatal error LNK1181: cannot open input file 'msvcrt.lib'^M
configure:2634: $? = 157
configure:2672: result: no
configure: failed program was:
| /* confdefs.h */


My LIB and LIBPATH
$ echo $LIB
/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib/amd64/:/home/sanfordjd/ProgramFile32/WindowsKits/8.1/Lib/winv6.3/um/x64:/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib:/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib/amd64:/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib/store/:/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib/store/amd64

$ echo $LIBPATH
/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib/amd64/

$ locate msvcrt.lib
/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib/amd64/msvcrt.lib
/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib/arm/msvcrt.lib
/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib/msvcrt.lib
/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib/store/amd64/msvcrt.lib
/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib/store/arm/msvcrt.lib
/cygdrive/c/MicrosoftVisualStudio12.0/VC/lib/store/msvcrt.lib
/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 11.0/VC/lib/amd64/msvcrt.lib
/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 11.0/VC/lib/arm/msvcrt.lib
/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 11.0/VC/lib/msvcrt.lib

0 个答案:

没有答案