我正在尝试通过vcbuild.bat
在Windows中构建Rebol3(用于工作),并出现unresolved externals
错误。这是该过程的一个片段,错误发生在那里。
<snip for brevity...>
host-lib.c
dev-stdio.c
dev-event.c
dev-file.c
dev-clipboard.c
link.exe /nologo /DEBUG /RELEASE /opt:ref /opt:icf /LTCG objs/a-constant
s.obj objs/a-globals.obj objs/a-lib.obj objs/b-boot.obj objs/b-init.obj objs/c-
do.obj objs/c-error.obj objs/c-frame.obj objs/c-function.obj objs/c-port.obj ob
js/c-task.obj objs/c-word.obj objs/d-crash.obj objs/d-dump.obj objs/d-print.obj
objs/f-blocks.obj objs/f-deci.obj objs/f-enbase.obj objs/f-extension.obj objs/
f-math.obj objs/f-modify.obj objs/f-random.obj objs/f-round.obj objs/f-series.o
bj objs/f-stubs.obj objs/l-scan.obj objs/l-types.obj objs/m-gc.obj objs/m-pool
s.obj objs/m-series.obj objs/n-control.obj objs/n-data.obj objs/n-io.obj objs/n
-loop.obj objs/n-math.obj objs/n-sets.obj objs/n-strings.obj objs/n-system.obj
objs/p-clipboard.obj objs/p-console.obj objs/p-dir.obj objs/p-dns.obj objs/p-ev
ent.obj objs/p-file.obj objs/p-net.obj objs/s-cases.obj objs/s-crc.obj objs/s-f
ile.obj objs/s-find.obj objs/s-make.obj objs/s-mold.obj objs/s-ops.obj objs/s-
trim.obj objs/s-unicode.obj objs/t-bitset.obj objs/t-block.obj objs/t-char.obj
objs/t-datatype.obj objs/t-date.obj objs/t-decimal.obj objs/t-event.obj objs/t-
function.obj objs/t-gob.obj objs/t-image.obj objs/t-integer.obj objs/t-logic.ob
j objs/t-map.obj objs/t-money.obj objs/t-none.obj objs/t-object.obj objs/t-pair
.obj objs/t-port.obj objs/t-string.obj objs/t-time.obj objs/t-tuple.obj objs/t-
typeset.obj objs/t-utype.obj objs/t-vector.obj objs/t-word.obj objs/u-bmp.obj
objs/u-compress.obj objs/u-dialect.obj objs/u-gif.obj objs/u-jpg.obj objs/u-md5
.obj objs/u-parse.obj objs/u-png.obj objs/u-sha1.obj objs/u-zlib.obj objs/host-
main.obj objs/host-args.obj objs/host-device.obj objs/host-stdio.obj objs/dev-n
et.obj objs/dev-dns.obj objs/host-lib.obj objs/dev-stdio.obj objs/dev-event.obj
objs/dev-file.obj objs/dev-clipboard.obj user32.lib ws2_32.lib advapi32.lib sh
ell32.lib comdlg32.lib /PDB:r3.pdb /OUT:r3.exe /SUBSYSTEM:WINDOWS
Creating library r3.lib and object r3.exp
f-math.obj : error LNK2001: unresolved external symbol _signbit
r3.exe : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BI
N\link.exe"' : return code '0x460'
Stop.
C:\r3\make>
我从here获得了r3 repo的副本,我正在使用MSVS 2010,它使用“Microsoft(R)32位C / C ++ Optmizing Compiler Version 16.00.30319.01 for 80x86 “,如果重要的话。
make prep
(Win32版本为make
)错误
REBOL System Error #1405: REBOL System Error
Program terminated abnormally.
This should never happen.
Please contact www.REBOL.com with details.
我做错了什么?这个问题的根源是什么?有解决方法吗?
答案 0 :(得分:1)
对于变通方法*,请在f-math.c中的最后一个#include
后面加上以下内容
#include <float.h>
int signbit(double x) {
return (x == 0) ? _fpclass(x) & _FPCLASS_NZ : x < 0;
}
但请注意,如果您想尝试,只需稍加修改就无法在mingw下编译。
*来自Rebol和Red聊天some time ago。