Pointers/Advice solicited on creating Angband solution inside VC++ 2008 Express

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jojojajumbo
    Rookie
    • Jul 2009
    • 3

    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.
  • ekolis
    Knight
    • Apr 2007
    • 921

    #2
    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!

    Comment

    • will_asher
      DaJAngband Maintainer
      • Apr 2007
      • 1124

      #3
      Paul Blay helped me out with Visual C++, I think what you need is in this post:
      Will_Asher
      aka LibraryAdventurer

      My old variant DaJAngband:
      http://sites.google.com/site/dajangbandwebsite/home (defunct and so old it's forked from Angband 3.1.0 -I think- but it's probably playable...)

      Comment

      • jojojajumbo
        Rookie
        • Jul 2009
        • 3

        #4
        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, 18:32.

        Comment

        • jojojajumbo
          Rookie
          • Jul 2009
          • 3

          #5
          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.

          Comment

          • Pete Mack
            Prophet
            • Apr 2007
            • 6883

            #6
            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.

            Comment

            Working...
            😀
            😂
            🥰
            😘
            🤢
            😎
            😞
            😡
            👍
            👎