Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old July 26, 2009, 12:31   #1
jojojajumbo
Rookie
 
Join Date: Jul 2009
Posts: 3
jojojajumbo is on a distinguished road
Pointers/Advice solicited on creating Angband solution inside VC++ 2008 Express

Hello,

I just tried to download and compile angband 3.1.1. I followed the instructions carefully and it was a breeze.

Aside from using nmake (I am not familiar with nmake and Makefiles), has anyone tried to use VC++ 2008 Express and create a solution/workspace to go through the compile? I attempted to use the same instructions in DevC++ and ran into all sorts of problems, namely, could not find main() ... resources duplicated etc etc.

I am a newbie in C and VC++ and the objective is to manage this compilation process inside VC++ so that I can launch the debugger to help me walk through the functions and facilitate my understanding the angband code.

Thanks in advance.
jojojajumbo is offline   Reply With Quote
Old July 26, 2009, 14:50   #2
ekolis
Knight
 
ekolis's Avatar
 
Join Date: Apr 2007
Location: Cincinnati, OH, USA
Age: 34
Posts: 911
ekolis is on a distinguished road
Send a message via AIM to ekolis Send a message via MSN to ekolis Send a message via Yahoo to ekolis
Hmm, been a while since I tried that, but I seem to recall one important point is to exclude all the main-??? files from the solution, except main-win... I think there's also a maid-gcu file or something which you want to exclude as well. Of course, the whole build process was redone some time in the not too distant past, so I could be completely wrong here...
__________________
You read the scroll labeled NOBIMUS UPSCOTI...
You are surrounded by a stasis field!
The tengu tries to teleport, but fails!
ekolis is offline   Reply With Quote
Old July 27, 2009, 06:42   #3
will_asher
DaJAngband Maintainer
 
will_asher's Avatar
 
Join Date: Apr 2007
Location: San Antonio, TX
Posts: 927
Donated: $10
will_asher is on a distinguished road
Paul Blay helped me out with Visual C++, I think what you need is in this post:
http://angband.oook.cz/forum/showpos...9&postcount=12
__________________
Will_Asher

Play DaJAngband:
http://sites.google.com/site/dajangbandwebsite/home
will_asher is offline   Reply With Quote
Old July 28, 2009, 18:09   #4
jojojajumbo
Rookie
 
Join Date: Jul 2009
Posts: 3
jojojajumbo is on a distinguished road
I followed the instructions, but it is no good.

The first complaint I got is in file main-nds.c where VC++ complained about could not find <nds.h>.

I figure since I am not targeting for the nds platform, I don't need to include that file. So, I removed src/main-nds.c from the project and retry.

That's when I ran into alot of unresolved external dependencies problems.

I combed the forums as well as instructions and found out I have to do the following:

1) add all the .c and .h files under monster/ object
2) add all the .c and .h files under player. Note that the file player/util.c must be renamed to something else first (e.g. putil.c, one of the earlier posts has indicated). This is because this file clashed with src/util.c.

At this moment, I am down to one error:

1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup

I then realized that when I created the project, I selected "Console" mode, whereupon I should have selected "Empty project".

I recreated the project, this time as "Empty Project" settings. Compilation is finally successful. Upon trying to run the program (and I did put it under angband-3.1.1 directory, right above src), a messed up dialog box showed up.

Still struggling ...

Last edited by jojojajumbo; July 28, 2009 at 18:32.
jojojajumbo is offline   Reply With Quote
Old August 5, 2009, 00:55   #5
jojojajumbo
Rookie
 
Join Date: Jul 2009
Posts: 3
jojojajumbo is on a distinguished road
Hi guys,

Just for interest, 2 weekends ago, I decided to perform the same steps on:
1) VC++ 6.0 (compiled fine and ran fine with Angband's welcome screen)
2) VC++ 2005 (compiled fine and ran fine with Angband's welcome screen
3) VC++ 2008 (compiled fine but ran with a completed messed up dialog screen)

I figure VC++ 2008 must have some default configurations set up that are different to the others. I decided to use VC++ 2008 on 2)'s solution, and it migrated them over. Then, it also compiled fine and ran fine with Angband's welcome screen.

I started out wanting to learn about Angband code, but now I am immersed trolling the dungeons with my 9th level human ranger.

Thanks to y'all for helping me out.
jojojajumbo is offline   Reply With Quote
Old August 5, 2009, 03:21   #6
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 4,861
Donated: $40
Pete Mack is on a distinguished road
Congrats on a successful migration. At some point (like next point release) Angband should include a VC++ proj file. Now that there's a free version of MSoft's IDE, it's probably reasonable to assume that MS hobby developers will be using Visual Studio as their environment of choice.
Pete Mack 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
Problems compiling Vanilla Angband 3.1.0b in MSVC++ 2008 Express Kyle Development 2 July 26, 2009 07:09
Idea for a solution to TMJ TJS Vanilla 6 January 22, 2009 20:51
[Un] Beginners pointers needed pndrev Variants 13 September 17, 2008 02:15
compiling vanilla angband on msvc++ 9 express hugh Vanilla 6 March 17, 2008 15:49
Getting Visual C++ 2008 Express Edition to compile Angband 3.0.9 Orillian Vanilla 5 February 10, 2008 09:23


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


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