Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old November 13, 2012, 16:48   #81
TJS
Swordsman
 
Join Date: May 2008
Posts: 473
TJS is on a distinguished road
Well that worked a treat thanks!

I should have figured that out ages ago.
TJS is offline   Reply With Quote
Old June 18, 2013, 10:25   #82
Zireael
Adept
 
Join Date: Jul 2011
Posts: 204
Zireael is on a distinguished road
What are the dependencies for Angband? (I'm on Win7)
Zireael is offline   Reply With Quote
Old June 23, 2013, 21:00   #83
TricksterWolf
Scout
 
Join Date: Sep 2012
Posts: 43
TricksterWolf is on a distinguished road
I'm back.

Trying to compile fresh again. I have angband set up through NetBeans, cloned from a fork of the recent master branch. Clean worked, compile didn't.

Turns out all I needed to do to get compiling to work was to change the make command from:

${MAKE} -f Makefile

...to:

${MAKE} MINGW=yes -f Makefile.win

However, I still have one fatal error:

z-file.c:25:21: fatal error: direct.h: No such file or directory

That's pretty close to the end of the object files so I'm fairly confident I'll get there eventually; but what is this "direct.h"? It's not part of the INCLUDED_ANGBAND_H list, and it's not in the main directory either.

Kinda stumped here.
TricksterWolf is offline   Reply With Quote
Old June 23, 2013, 21:11   #84
TricksterWolf
Scout
 
Join Date: Sep 2012
Posts: 43
TricksterWolf is on a distinguished road
BUCK YES

I did it. It actually compiles.

Here's what I had to change (in z-file.c), apart from what I mentioned earlier wrt the make command.

1) Commented out the <direct.h> include.

2) Changed the definition of my_mkdir in WINDOWS to make it identical to the definition used in HAVE_MKDIR || MACH_O_CARBON. In other words, it now calls mkdir(path, perms) instead of mkdir(path) even though WINDOWS is defined.

This is using NetBeans over Cygwin on Windows 7, for those curious.

(Now I have to figure out how to run the damn thing, as it is demanding dll's it isn't finding.)
TricksterWolf is offline   Reply With Quote
Old June 23, 2013, 22:20   #85
TricksterWolf
Scout
 
Join Date: Sep 2012
Posts: 43
TricksterWolf is on a distinguished road
I changed the main directory to be src, but now it's complaining it can't find lib (it's looking for something in lib/apex so I know it's not win/lib). I may need to compare this to my separate ang game that I play to see what is missing.

Any clues would be handy, if you have them. Thanks!

UPDATE: If I try to run angband.exe from the directory it's in, it complains about needing a cygwin1.dll. I want this to run through Windows, not Cygwin; I'm only using Cygwin to compile the damned thing. Am I going about this all wrong?

UPDATE MOAR: I'm starting to suspect that the problem is mkdir related, in which case my workaround for z-file.c was not correct... But again, any advice would be appreciated.

Last edited by TricksterWolf; June 23, 2013 at 23:00.
TricksterWolf is offline   Reply With Quote
Old June 24, 2013, 19:37   #86
TricksterWolf
Scout
 
Join Date: Sep 2012
Posts: 43
TricksterWolf is on a distinguished road
FINALLY!

I had to re-import the project. The problem was that I had the src folder listed as the project folder, and I needed to be one level up. Mostly my fault but still a bit of a stumbler given my lack of knowledge of all the details to the folder structure.

Everything works now. For the record, I had to change the make command and I had to edit z-file.c as described before.

However, I can run the program from within NetBeans, but not outside it. From outside my IDE it demands cygwin1.dll, which suggests to me that I'm not compiling this properly so it will run under Windows without Cygwin installed.


UPDATE: The issue seems to be that I'm not using a cross-compiler properly. I'll do some research on the Web until I find the answer. So close and yet so far...
TricksterWolf is offline   Reply With Quote
Old January 27, 2014, 07:34   #87
Mark
Adept
 
Join Date: Oct 2007
Posts: 129
Mark is on a distinguished road
Trying to compile in VS2013, Windows 7

Hi Guys,

I'm trying to compile the latest version from github in VS2013, on Windows 7 (SP1, 64-bit).

I'm trying to follow the steps found in
\src\win\angband_visual_studio_step_by_step.txt (attached)

1) It mentions nothing about Makefile. I know nothing about Makefile either, so I'm hoping the talk of Makefile on this thread doesn't apply to Win7/VS2013

2) I've done all the steps, but step 6 is unclear to me, perhaps terminology has changed in VS since the steps were written. Step 6 says:

Quote:
6. In the project settings, in the Link tab, in the Object/library modules
line, add: "src\win\zlib1.lib src\win\libpng.lib msimg32.lib winmm.lib "
to the front of the line.
I'm not sure if I've entered "src\win\zlib1.lib src\win\libpng.lib msimg32.lib winmm.lib " in the correct place, so I ended up entering it in multiple places, see screenshot attached.

When I compile, I get these errors:

Code:
1>------ Build started: Project: Angband15MG, Configuration: Debug Win32 ------
1>  z-set.c
1>d:\users\mark\documents\github\angband\build\src\z-set.c(53): error C2065: 'ssize_t' : undeclared identifier
1>d:\users\mark\documents\github\angband\build\src\z-set.c(53): error C2146: syntax error : missing ';' before identifier 'i'
1>d:\users\mark\documents\github\angband\build\src\z-set.c(53): error C2065: 'i' : undeclared identifier
1>d:\users\mark\documents\github\angband\build\src\z-set.c(56): error C2065: 'i' : undeclared identifier
1>d:\users\mark\documents\github\angband\build\src\z-set.c(57): error C2065: 'i' : undeclared identifier
1>d:\users\mark\documents\github\angband\build\src\z-set.c(61): error C2065: 'i' : undeclared identifier
1>  mon-lore.c
1>d:\users\mark\documents\github\angband\build\src\monster\mon-lore.c(1531): error C2057: expected constant expression
1>d:\users\mark\documents\github\angband\build\src\monster\mon-lore.c(1531): error C2466: cannot allocate an array of constant size 0
1>d:\users\mark\documents\github\angband\build\src\monster\mon-lore.c(1531): error C2133: 'name_list' : unknown size
1>d:\users\mark\documents\github\angband\build\src\monster\mon-lore.c(1532): error C2057: expected constant expression
1>d:\users\mark\documents\github\angband\build\src\monster\mon-lore.c(1532): error C2466: cannot allocate an array of constant size 0
1>d:\users\mark\documents\github\angband\build\src\monster\mon-lore.c(1532): error C2133: 'color_list' : unknown size
1>d:\users\mark\documents\github\angband\build\src\monster\mon-lore.c(1533): error C2057: expected constant expression
1>d:\users\mark\documents\github\angband\build\src\monster\mon-lore.c(1533): error C2466: cannot allocate an array of constant size 0
1>d:\users\mark\documents\github\angband\build\src\monster\mon-lore.c(1533): error C2133: 'damage_list' : unknown size
1>  Generating Code...
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Can anyone offer me any help? Much appreciated if so!
Attached Thumbnails
Click image for larger version

Name:	PlacingTextInStep6.jpg
Views:	116
Size:	13.8 KB
ID:	1093   Click image for larger version

Name:	MaybeStuffinStep6GoesSomewhereHere.jpg
Views:	116
Size:	15.8 KB
ID:	1094  
Attached Files
File Type: txt angband_visual_studio_step_by_step.txt (2.5 KB, 56 views)
Mark is offline   Reply With Quote
Old January 27, 2014, 21:23   #88
Blue Baron
Adept
 
Join Date: Apr 2011
Posts: 103
Blue Baron is on a distinguished road
Quote:
Originally Posted by Mark View Post
1) It mentions nothing about Makefile. I know nothing about Makefile either, so I'm hoping the talk of Makefile on this thread doesn't apply to Win7/VS2013
yeah, the makefile is typically used when cross compiling on Linux, or when using Cygwin or MSYS.

Quote:
Originally Posted by Mark View Post
2) I've done all the steps, but step 6 is unclear to me, perhaps terminology has changed in VS since the steps were written. Step 6 says:

I'm not sure if I've entered "src\win\zlib1.lib src\win\libpng.lib msimg32.lib winmm.lib " in the correct place, so I ended up entering it in multiple places, see screenshot attached.
The image is difficult to read, but it looks like the first line of the first image is "additional dependencies", and the last item on that line is "kernel{32 or 64}.lib". If so, that would be the correct line.


Quote:
Originally Posted by Mark View Post
When I compile, I get these errors:
for the first error group (in z-set.c) the compiler is not finding a definition of "ssize_t". I'm not sure where it might be defined, but you should be able to be replace it with "int" on line 53, as that is the return value of the function _set_find.

for the second group (in monster/mon-lore.c), visual studio does not see list_size as a constant for the array initializations. you should be able to replace "list_size" with "64" on lines 1531, 1532,and 1533, to get it to compile.

I have not tried it, so I'm not sure if the above is correct, but the above replacements might get it to compile for you.
Blue Baron is offline   Reply With Quote
Old January 28, 2014, 07:58   #89
Mark
Adept
 
Join Date: Oct 2007
Posts: 129
Mark is on a distinguished road
Thanks for your help Blue Baron.

I made the replacements you suggested and the errors stopped. Weird that the const declaration one line above didn't seem to prevent it anyway

Code:
	static const int list_size = 64;
sits right above
Code:
	const char *initial_pronoun;
	const char *name_list[64];
	int color_list[64];
	int damage_list[64];
(the above snippet already has "list_size" swapped for "64")

Then I ran into Linker errors, apparently the path and file names I put in the additional dependancies were incorrect. (I put "\src\win\" but needed "\src\win\lib" and I refered to "zlib1.lib", whereas it needed to be "zlib.lib"). Perhaps the Visual Studio help file can be updated. (If I were more confident in my github usage and that these are indeed corrections not artifacts of something I'm doing wrong, I'd make the change myself).

However (!) I now get new errors:

Code:
1>------ Build started: Project: Angband15MG, Configuration: Debug Win32 ------
1>cmd-misc.obj : error LNK2019: unresolved external symbol _do_cmd_borg referenced in function _do_cmd_try_borg
1>dungeon.obj : error LNK2001: unresolved external symbol _borg_active
1>D:\Users\mark\Documents\GitHub\angband\build\Debug\Angband15MG.exe : fatal error LNK1120: 2 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Any ideas how to fix them or if I'm doing something fundamentally wrong in the first instance?

Something Borgish not updated/supported in the latest win libs?
Mark is offline   Reply With Quote
Old January 28, 2014, 08:13   #90
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,860
Donated: $60
Nick will become famous soon enough
OK, I don't really know what I'm doing here, but I'll have a guess.

It looks like the instructions don't include compiling the borg in. So your options to me look like:
  1. Don't include the borg. To do this, I think just commenting out (or deleting) the line
    Code:
    #define ALLOW_BORG
    in src\config.h should work;
  2. Compile the borg in. I suspect adding all the .c and .h files in the src\borg directory (as you did for the src\player etc directories) will do the trick, or at least give a different error.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling Angband on MS-DOS Zababa Development 8 May 27, 2011 18:36
Compiling Angband 3.0.9 w/ xcode on OSX Iemortal Vanilla 8 April 16, 2011 17:41
Compiling Z+Angband under Windows Altefcat Variants 8 December 11, 2008 10:44
compiling vanilla angband on msvc++ 9 express hugh Vanilla 6 March 17, 2008 16:49
Trouble compiling angband 3.0.9 on linux RastaRuedi Vanilla 2 August 1, 2007 18:28


All times are GMT +1. The time now is 04:45.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.