![]() |
#1 |
Rookie
Join Date: Dec 2017
Posts: 4
![]() |
Trouble compiling Angband
I'm on Windows 8.1 using visual studio 2017. I get error: Error C1189 #error: Macro definition of snprintf conflicts with Standard Library function declaration Angband1 c:\program files (x86)\windows kits\10\include\10.0.16299.0\ucrt\stdio.h 1933
Please help. Thanks. |
![]() |
![]() |
![]() |
#2 |
Vanilla maintainer
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,862
Donated: $60
![]() |
Try going into the file src\h-basic.h, removing these lines:
Code:
/** * Native MSVC compiler doesn't understand inline or snprintf */ #ifdef _MSC_VER # define inline __inline # define snprintf _snprintf #endif Those lines were apparently to deal with deficiencies in the Microsoft compiler which look like they may have been fixed. Let us know how you go.
__________________
One for the Dark Lord on his dark throne In the Land of Mordor where the Shadows lie. |
![]() |
![]() |
![]() |
#3 |
Rookie
Join Date: Dec 2017
Posts: 4
![]() |
I'm down to 4 errors:
Error (active) E0028 expression must have a constant value Angband1 c:\Users\Robert\source\repos\Angband1\Angband1\loa d.c 808 Error C2057 expected constant expression Angband1 c:\users\robert\source\repos\angband1\angband1\loa d.c 808 Error C2466 cannot allocate an array of constant size 0 Angband1 c:\users\robert\source\repos\angband1\angband1\loa d.c 808 Error C2133 'itypes': unknown size Angband1 c:\users\robert\source\repos\angband1\angband1\loa d.c 808 line 808 from load.c looks like: Code:
bitflag flags, itypes[itype_size]; |
![]() |
![]() |
![]() |
#4 |
Vanilla maintainer
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,862
Donated: $60
![]() |
OK, you can safely replace itype_size with ITYPE_SIZE in that line, which should fix that problem.
__________________
One for the Dark Lord on his dark throne In the Land of Mordor where the Shadows lie. |
![]() |
![]() |
![]() |
#5 |
Rookie
Join Date: Dec 2017
Posts: 4
![]() |
2 errors:
Error LNK2001 unresolved external symbol _init_sound_win Angband1 C:\Users\Robert\source\repos\Angband1\Angband1\sou nd-core.obj 1 Error LNK1120 1 unresolved externals Angband1 C:\Users\Robert\source\repos\Angband1\Debug\Angban d1.exe 1 I may end up having to start over from the beginning. This is what I did since the visual studio instructions are out of date:
|
![]() |
![]() |
![]() |
#6 |
Rookie
Join Date: Dec 2017
Posts: 4
![]() |
I think I'm going to wait to compile until there is an update for visual studio instructions. Thanks for the help.
|
![]() |
![]() |
![]() |
#7 |
Vanilla maintainer
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,862
Donated: $60
![]() |
Sorry, I missed your last post.
You could try replacing Code:
errr init_sound_win(struct sound_hooks *hooks, int argc, char **argv); Code:
extern errr init_sound_win(struct sound_hooks *hooks, int argc, char **argv);
__________________
One for the Dark Lord on his dark throne In the Land of Mordor where the Shadows lie. |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Trouble compiling | spara | Development | 3 | December 20, 2016 20:34 |
re: Get Angband and compiling it | Tibarius | Development | 0 | June 29, 2015 11:42 |
Compiling Z+Angband | Ravenheart87 | Variants | 7 | May 24, 2011 09:35 |
Angband startup trouble. | Zambaku | Vanilla | 1 | January 1, 2008 06:43 |
Trouble compiling angband 3.0.9 on linux | RastaRuedi | Vanilla | 2 | August 1, 2007 18:28 |