Compiling Angband on Windows with Visual Studio
Collapse
X
-
On the same line as the 32-bit versus 64-bit issue, you'll have to build for an x86 target if you are using the versions of libpng and zlib packaged with the source code: those libraries are 32-bit and for x86 only. If you want to build for something that is not x86, you would need to replace those libraries. -
I've gotten similar errors. I'll experiment more a bit later.
Code:Severity Code Description Project File Line Suppression State Details Error C1083 Cannot open include file: 'list-effects.h': No such file or directory AngbandTest C:\Users\dynam\source\repos\AngbandTest\AngbandTes t\src\borg\borg-magic-play.c 38 Error C1083 Cannot open include file: 'list-tvals.h': No such file or directory AngbandTest C:\Users\dynam\source\repos\AngbandTest\AngbandTes t\src\borg\borg-formulas.c 60 Error C1083 Cannot open include file: 'ui-menu.h': No such file or directory AngbandTest C:\Users\dynam\source\repos\AngbandTest\AngbandTes t\src\borg\borg-item-decurse.c 24
One note is that you need to make sure to be using a 32-bit compile, not 64-bit. Otherwise libpng gets mad.
Leave a comment:
-
I've gotten similar errors. I'll experiment more a bit later.
Code:Severity Code Description Project File Line Suppression State Details Error C1083 Cannot open include file: 'list-effects.h': No such file or directory AngbandTest C:\Users\dynam\source\repos\AngbandTest\AngbandTes t\src\borg\borg-magic-play.c 38 Error C1083 Cannot open include file: 'list-tvals.h': No such file or directory AngbandTest C:\Users\dynam\source\repos\AngbandTest\AngbandTes t\src\borg\borg-formulas.c 60 Error C1083 Cannot open include file: 'ui-menu.h': No such file or directory AngbandTest C:\Users\dynam\source\repos\AngbandTest\AngbandTes t\src\borg\borg-item-decurse.c 24
Leave a comment:
-
All the other references to Angband's include files in the borg have "../" in front of the file name so that line in borg-formulas.h should be
<CODE>
#include "../list-tvals.h"
</CODE>
The builds we do on GitHub using the project files in src/win/vs2019 should have caught that; it's not clear to me why they didn't.Leave a comment:
-
When you followed step 2 of those instructions, did you create an empty win32 project? It looks like you are missing a preprocessor define (either _WINDOWS, __WINDOWS__, __WIN32__, WIN32, __WINNT__, or __NT__ would work), and I suspect that one of those should have been set if the appropriate project type had been selected.
There's a couple of additional preprocessor defines that you may want to set in step 11 of those instructions: BORG (to enable the borg) and _CRT_SECURE_NO_WARNINGS (to disable some warnings that Microsoft's compiler likes to issue about some standard C library or Unix-compatibility functions).
Now I'm getting the below errors, even though I included list-tvals.h in the project.
Code:Severity Code Description Project File Line Suppression State Details Error C1083 Cannot open include file: 'list-tvals.h': No such file or directory AngbandTest C:\Users\dynam\source\repos\AngbandTest\AngbandTes t\src\borg\borg-formulas.h 46
Leave a comment:
-
When you followed step 2 of those instructions, did you create an empty win32 project? It looks like you are missing a preprocessor define (either _WINDOWS, __WINDOWS__, __WIN32__, WIN32, __WINNT__, or __NT__ would work), and I suspect that one of those should have been set if the appropriate project type had been selected.
There's a couple of additional preprocessor defines that you may want to set in step 11 of those instructions: ALLOW_BORG (to enable the borg) and _CRT_SECURE_NO_WARNINGS (to disable some warnings that Microsoft's compiler likes to issue about some standard C library or Unix-compatibility functions).Last edited by backwardsEric; October 11, 2024, 14:15. Reason: Replaced BORG with the correct ALLOW_BORGLeave a comment:
-
Compiling Angband on Windows with Visual Studio
Hi!
I'm trying to compile Angband using Visual Studio, following this guide --
However, when I got to the "build" step, I got the following errors.
Can anyone help me figure out what to do next?
Thank you!
Code:Severity Code Description Project File Line Suppression State Details Error (active) E1696 cannot open source file "unistd.h" AngbandTest C:\Users\dynam\source\repos\AngbandTest\AngbandTes t\src\h-basic.h 121 Error (active) E1696 cannot open source file "pwd.h" AngbandTest C:\Users\dynam\source\repos\AngbandTest\AngbandTes t\src\h-basic.h 119
Tags: None
Leave a comment: