ZILtoid1991 / pixelperfectengine

2D graphics engine written in D
Boost Software License 1.0
93 stars 2 forks source link

Linking error in Windows 10 #26

Closed NullDott closed 2 months ago

NullDott commented 2 months ago

Building from source in Windows 10 fails during linking process, more specifically from an unmet dependency in libxinput.

This is what dub output shows.

    Building pixelperfectengine ~master: building configuration [library]
    Building pixelperfectengine:wmfc ~master: building configuration [application]
     Linking pixelperfectengine_wmfc
lld-link: error: could not open 'xinput.lib': no such file or directory
Error: linking with LLD failed
Error ldc2 failed with exit code 1.

branch: master compiler: ldc2 1.39.0

ZILtoid1991 commented 2 months ago

I use MSVC's own linker instead, but maybe you can aquire xinput.lib for mingw, which library LDC uses by default for linking.

NullDott commented 2 months ago

I do have MSYS2 installed, maybe I can find something about that, I'll check on changing the linker if I don't found xinput.lib, thanks

NullDott commented 2 months ago

I tried again by using MSVC's linker, and this time gave me a different output

LINK : fatal error LNK1201: error writing to program database 'C:\Users\NullDott\Repositories\pixelperfectengine\bin-x86_64-windows\pixelperfectengine_wmfc.pdb'; check for insufficient disk space, invalid path, or insufficient privilege
Error: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\HostX64\x64\link.exe failed with status: 1201
Error ldc2 failed with exit code 1.

Now it is looking for bin-x86_64-windows\pixelperfectengine_wmfc.pdb, the folder didn't existed in the repo, so created it and it actually built, however I couldn't use the engine due to my screen being to small I guess.

ZILtoid1991 commented 2 months ago

My apologies, I've optimized the raster for FullHD displays (1080p). You can however still manually set the resolution by editing windowmakerforconcrete/src/editor.d. Replacing all instances of 1696,960 (lines 207 and 212) to 848,480 will result in a 1:1 resolution, which can better fit to smaller screens. PixelPerfectEditor can be set through its configuration file.

NullDott commented 2 months ago

Oh! Thanks then!! I'll try it out that way then.