Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old February 12, 2015, 15:25   #41
EpicMan
Swordsman
 
Join Date: Dec 2009
Location: Dallas, Texas, USA
Posts: 356
EpicMan is on a distinguished road
I think this is due to VS not supporting newer C standards, specifically C99. This article has more info: http://stackoverflow.com/questions/1...-c-c-standards

The article mentions using the Intel compiler in place of Microsoft's, though I haven't tried that. You can also re-write the sections of code that aren't supported; I think if you change the struct declarations and change any array size definitions to constants you should be 95% done (or at least that was the case before the restructure).
EpicMan is offline   Reply With Quote
Old February 12, 2015, 16:41   #42
TJS
Swordsman
 
Join Date: May 2008
Posts: 473
TJS is on a distinguished road
Ah ok thanks for the information, I guess that Angband is not going to normally be compilable on Visual C++.

I might look into using another compiler and IDE, what do other people use when compiling the game?
TJS is offline   Reply With Quote
Old February 12, 2015, 20:13   #43
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,737
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by TJS View Post
Hey up, I just tried to compile the latest code from git with Visual Studio Express 2010 and there are a whole bunch of syntax errors happening in get.h and get.c.

It does compile using MinGW but I can't debug it when it crashes.

Edit: there's also a syntax error in init.c as it doesn't like starting the member names with a dot:

static struct init_module arrays_module = {
.name = "arrays",
.init = init_arrays,
.cleanup = cleanup_arrays
};
The get.* issue is easily solved - they're not used, delete them.

The other error may well be a VS problem - I thought that MS had included enough of the C99 standard now, but apparently not.

I believe I have managed to debug in windows using msys, MinGW and gdb, but I may be misremembering.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old February 12, 2015, 20:19   #44
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,367
AnonymousHero is on a distinguished road
Quote:
Originally Posted by Nick View Post
The get.* issue is easily solved - they're not used, delete them.

The other error may well be a VS problem - I thought that MS had included enough of the C99 standard now, but apparently not.

I believe I have managed to debug in windows using msys, MinGW and gdb, but I may be misremembering.
Nope, no C99 for you in VS. (Not even stdint.h as I recall!)

They do support(-ish) recent versions of C++, but that's not really relevant here. Of course C++ initializer syntax is incompatible with C99 anyway, so...
AnonymousHero is offline   Reply With Quote
Old February 13, 2015, 11:40   #45
TJS
Swordsman
 
Join Date: May 2008
Posts: 473
TJS is on a distinguished road
Quote:
Originally Posted by Nick View Post
The get.* issue is easily solved - they're not used, delete them.

The other error may well be a VS problem - I thought that MS had included enough of the C99 standard now, but apparently not.

I believe I have managed to debug in windows using msys, MinGW and gdb, but I may be misremembering.
Do you think it might be made VS compatible sometime?
TJS is offline   Reply With Quote
Old February 13, 2015, 13:34   #46
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,737
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by TJS View Post
Do you think it might be made VS compatible sometime?
Well, you never know - maybe Microsoft will implement support for modern C one day

By the way, have you checked out this thread? I assume that it is not much help, but there might be something in there of use to you.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old February 15, 2015, 12:24   #47
TJS
Swordsman
 
Join Date: May 2008
Posts: 473
TJS is on a distinguished road
Quote:
Originally Posted by Nick View Post
Well, you never know - maybe Microsoft will implement support for modern C one day
Seems completely mad that Microsoft won't implement the latest standards.

I guess that it is a balance though between wanting to use the latest shiny code standards and reducing compatibility for people who might want to help with the game

Are the new code standards that vital to use despite reducing who can compile the game? (Genuine question I'm not trying to be argumentative or anything, I'm not really up to date on these things). Angband used to compile on VS no problem in the past.

Quote:
By the way, have you checked out this thread? I assume that it is not much help, but there might be something in there of use to you.
I spend a few hours trying to get it to compile on various systems. I got MinGW working, but I couldn't figure out any way of debugging it or a IDE that went with it. I couldn't figure out Eclipse at all. I suck at this sort of thing
TJS is offline   Reply With Quote
Old February 15, 2015, 12:53   #48
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,737
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by TJS View Post
I guess that it is a balance though between wanting to use the latest shiny code standards and reducing compatibility for people who might want to help with the game

Are the new code standards that vital to use despite reducing who can compile the game? (Genuine question I'm not trying to be argumentative or anything, I'm not really up to date on these things). Angband used to compile on VS no problem in the past.
I tend to favour utility over shininess.

I think
Code:
static struct init_module arrays_module = {
"arrays",
init_arrays,
cleanup_arrays
};
should work (and the same for any other similar construction). Let me know if it does, and what other problems you run into, and we'll see what we can do
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old February 15, 2015, 13:46   #49
debo
Veteran
 
debo's Avatar
 
Join Date: Oct 2011
Location: Toronto, Canada
Posts: 2,356
debo is on a distinguished road
Something with a '99' in its name should probably have a good patina by now, anyways
__________________
Glaurung, Father of the Dragons says, 'You cannot avoid the ballyhack.'
debo is offline   Reply With Quote
Old February 16, 2015, 01:25   #50
Quendus
Scout
 
Join Date: Jun 2007
Posts: 32
Quendus is on a distinguished road
TJS did say they were using VS express 2010 - MS might have improved C99 support in VS 2012 and 2013 (which also have free express versions).
Quendus 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
Ladder restructure request OOD Town drunk Vanilla 7 April 4, 2013 16:11
v4 update Magnate v4 10 December 13, 2011 13:40
Ladder Update UglySquirrell Vanilla 2 September 20, 2011 04:50
Quickband update Antoine Variants 11 March 21, 2011 01:26
Help me update PosBand! pampl Development 20 December 27, 2010 18:55


All times are GMT +1. The time now is 21:29.


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