zhad3 / zrenderer

A renderer for Ragnarok Online sprites

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to build in windows

alisonrag opened this issue · comments

OS: Windows 10 PRO
Visual Studio: 2022 Community
DUB version 1.27.0, built on Dec 19 2021

executed command in Developer Console:
dub build :server

error:

source\linearalgebra\operations.d(290,23): Error: `pure` function `linearalgebra.operations.apply!(round).apply` cannot call impure function `std.math.rounding.round`
source\linearalgebra\operations.d(290,38): Error: `pure` function `linearalgebra.operations.apply!(round).apply` cannot call impure function `std.math.rounding.round`
source\linearalgebra\transform.d(56,99): Error: template instance `linearalgebra.operations.apply!(round)` error instantiating
source\linearalgebra\operations.d(295,23): Error: `pure` function `linearalgebra.operations.apply!(round).apply` cannot call impure function `std.math.rounding.round`
source\linearalgebra\operations.d(295,38): Error: `pure` function `linearalgebra.operations.apply!(round).apply` cannot call impure function `std.math.rounding.round`
source\linearalgebra\operations.d(295,53): Error: `pure` function `linearalgebra.operations.apply!(round).apply` cannot call impure function `std.math.rounding.round`
source\renderer.d(59,39): Error: template instance `linearalgebra.operations.apply!(round)` error instantiating
C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.

screenshot:
image

commented

Yeah, I am currently not using the newest version of DMD or LDC where this check does not seem to be performed. Either that or the round functions signature changed. I am using LDC2 1.26.0 which would be the equivalent of DMD v2.096.1.

I'll try the latest version on Windows and see if there are more than just the issues in your post when I have time.

commented

@alisonrag I have committed a change that should fix this. I recommend using the LDC2 compiler though as I have had trouble with DMD myself. I also updated the README accordingly that shows the build command using LDC2.

i think i messed something related to visual studio / compiler
image

i will try a clean installation later but thanks for the update <3

commented

It says there:
warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
It seems you have started the visual studio developer console for x86 instead of x64.

same error
image

i will try to uninstall everything and re-install

commented

Interesting. Can you try to add --force. That will recompile everything, also the dependencies.

uninstalled everything, cleaned left folders ( included C:\Users\User\AppData\Local\dub)

installed:
Visual Studio 2019 Community version and Build Tools to VS 2019
ldc2-1.28.1-windows-multilib (in installation selected only x64 lib)
added C:\Program Files\LDC 1.28\lib64 and C:\Program Files\LDC 1.28\bin to path. (ldc2 installer doesn't add)

opened:
x64 Native Tools Command Prompt for VS 2019

executed the following commands:
dub build --compiler=ldc2 --build=release --force :server
dub build --compiler=ldc2 --build=release --force :cli

and it is working
CLI:
image

server:
image

result:
image

thanks for the help and congratulations for this awesome project