On Wednesday, 12 September 2018 at 15:13:36 UTC, Timoses wrote:
try `dub --build-mode=singleFile` ? I believe this will compile
each file and then link them together (instead of compiling it
all together what dub does, afaik).
There's been another topic on memory consumption of compilation
[1].
[1]:
https://forum.dlang.org/post/ehyfilopozdndjdah...@forum.dlang.org
thanks timoses ,
singleFile mode works for building, but when linking, I got this:
--------------
OPTLINK (R) for Win32 Release 8.00.17
Copyright (C) Digital Mars 1989-2013 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
OPTLINK : Warning 9: Unknown Option : LLIB
OPTLINK : Warning 9: Unknown Option : WIN32
C:\Users\Administrator.USER-20180912OL\AppData\Local\dub\packages\gtk-d-3.8.3\gtk-d\.dub\build\library-debug-windows-x86-dmd_2082-9C5C1D99F672708E9D6D6FE9E60296B4\gtkd-3.lib
Warning 178: .LIB pagesize exceeds 512
C:\Users\Administrator.USER-20180912OL\AppData\Local\dub\packages\gtk-d-3.8.3\gtk-d\.dub\build\library-debug-windows-x86-dmd_2082-9C5C1D99F672708E9D6D6FE9E60296B4\gtkd-3.lib
Error 7: Out of Memory
Error: linker exited with status 1
dmd failed with exit code 1.
---------------
I think that DMD should give up it's DMC linkers, using MinGW ld
instead. DMC linker is not even a working linker.