• 报错
checking resolved symbolic links for CC... no symlink
configure: Using microsoft C compiler version 18.00.31101 [Microsoft (R) C/C++ Optimizing Compiler Version 18.00.31101 for x64]
checking whether the C compiler works... no
configure: error: in `/cygdrive/d/Office-3.5-project/tsjdk11-project/ts-jdk11':
configure: error: C compiler cannot create executables
See `config.log' for more details
configure exiting with result code 77
  • 检查config.log

忽略cl --version/cl -V/cl -qversion之类的错误,定位:

configure:36611: checking whether the C compiler works
configure:36633: /cygdrive/c/progra~2/micros~1.0/vc/bin/amd64/cl conftest.c >&5
Microsoft (R) C/C++ Optimizing Compiler Version 18.00.31101 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

conftest.c
Microsoft (R) Incremental Linker Version 12.00.31101.0
Copyright (C) Microsoft Corporation. All rights reserved.

/out:conftest.exe
conftest.obj
LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
configure:36637: $? = 2
configure:36675: result: no
configure: failed program was:
  • VS解决办法

原因当前的lib路径中,找不到kernel32.lib。

搜索了一下,说是给VS项目加上路径,项目属性->配置属性->VC++目录->库目录,添加二选一:

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib\x64

  • JDK11编译解决办法1

修改了toolchain_windows.m4,484处增加了一句:

VS_LIB="$VS_LIB;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib\x64"

  • JDK11编译解决办法2

能不能修改什么变量,让其自动读取到?