Reputation: 14065
I'm trying to build Rebol3 in Windows (it's for work) via vcbuild.bat
, and getting an unresolved externals
error. Here's a snippet from the process, the error happens at the bottom there.
<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>
I've got a copy of the r3 repo from here, and I'm using MSVS 2010, which uses the "Microsoft (R) 32-bit C/C++ Optmizing Compiler Version 16.00.30319.01 for 80x86", in case that matters.
make prep
(with the Win32 edition of make
) errors with
REBOL System Error #1405: REBOL System Error
Program terminated abnormally.
This should never happen.
Please contact www.REBOL.com with details.
What am I doing wrong? What's the source of the issue? Is there a workaround?
Upvotes: 0
Views: 167
Reputation: 722
For a workaround*, include the following right after the last #include
in f-math.c
#include <float.h>
int signbit(double x) {
return (x == 0) ? _fpclass(x) & _FPCLASS_NZ : x < 0;
}
Be aware, though, that with that little modification you won't be able to compile under mingw, in case you want to try that.
* From the Rebol and Red chat some time ago.
Upvotes: 1