Go Back   Angband Forums > Angband > Development

Thread Tools Display Modes
Old June 14, 2011, 19:12   #11
Join Date: Jun 2010
Posts: 286
Chud is on a distinguished road
Sure, be happy to, though I'll wait until I get home and can take some screen shots from eclipse - that'll probably make things clearer.
Chud is offline   Reply With Quote
Old June 14, 2011, 20:32   #12
Blue Baron
Join Date: Apr 2011
Posts: 103
Blue Baron is on a distinguished road
Originally Posted by d_m View Post
Is there a good #define that we could use to do some of these things for you via macros? I feel bad that you have to make so many source modifications to get things going...
I have been reading about the changes I made. I still think that the extra const in line 74 of externs.h should be removed and the snprintf calls should changed to strnfmt (or strnfmt calls changed to snprintf). But for the rest I have reverted my changes and added some defines.

In z-queue.h I changed the include line to:
/* MSVC doesn't have stdint.h (which is C99), so we'll just
 create the right pointer manually */
#ifdef _MSC_VER
#ifdef _WIN64
typedef unsigned _int64 * uintptr_t // I do not know what should be here
typedef unsigned int * uintptr_t
#include <stdint.h>
This is based on a section at the bottom of defines.h and that wikepedia says that VS2010 does not support C99.

In main-win.c I added the following below #if (defined(WINDOWS) && !defined(USE_SDL)):
#ifndef GetWindowLongPtr
#define GetWindowLongPtr GetWindowLong
#ifndef SetWindowLongPtr
#define SetWindowLongPtr SetWindowLong
I have not tested this in a recent Visual Studio, so I do not know
if it will work (that it will skip all of the defines), but it works for me in VC++ 6.0.

For the variadic macros in generate.c (which are C99 as well) the following compiles for me:
#if __STDC_VERSION__ < 199901L
#define ROOM_LOG if (OPT(cheat_room)) msg
#define ROOM_LOG(...) if (OPT(cheat_room)) msg(__VA_ARGS__);
but I have not enabled the cheat_room option to make sure that it works.

BTW, snprintf is C99 as well.

Edit: all of this is for the June 10th nightly.

Last edited by Blue Baron; June 14, 2011 at 20:43.
Blue Baron is offline   Reply With Quote
Old June 14, 2013, 23:40   #13
APWhite's Avatar
Join Date: Jul 2007
Location: St George Utah, USA
Posts: 244
APWhite is on a distinguished road
Did anyone ever get a solution to compile and work for VS2010 or VS2008. I am still stuck in limbo. I can get my 330 to compile but it won't run. There are errors in the .exe file. I had to do a whole bunch of tinkering on the source to get it to work.

I'd be happy if someone sent me a working Vanilla340 solution for VS2008 or VS2010. Maybe then, I can update the borg.
APWhite is offline   Reply With Quote

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
Issue with compile on Windows 7 64-bit using Visual C++ Express command line -K- Development 1 January 15, 2011 21:28
Request for votes: Ascii Dreams Roguelike of the Year 2010 andrewdoull Idle chatter 2 January 2, 2011 14:39
angband elites 2010 dos350 Vanilla 2 September 26, 2010 18:30
Visual Studio 2008 - building 32 & 64 bit now! LanceDiamond Development 5 April 25, 2009 14:59
Getting Visual C++ 2008 Express Edition to compile Angband 3.0.9 Orillian Vanilla 5 February 10, 2008 10:23

All times are GMT +1. The time now is 22:32.

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