Need help with compliing Angband with Visual Studio 2016

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nekoninja
    Rookie
    • Apr 2016
    • 5

    Need help with compliing Angband with Visual Studio 2016

    This is my first time attempting to build Angband. I have both Visual Studio 2016 and Codeblocks 16.01 version. I found a instruction on how to build Angband with Visual Studio but I think it may be outdated due to changing Visual Studio versions. Is there anyoine who have successful build Angband with VS 2016 or Codeblocks cuz I would like the project files to get starting.

    I have successfully git Angband from GitHub. Just that building the source is my obstacle for now.

    Any help would be greatly appreciates, not only for me but others as well.
  • Nomad
    Knight
    • Sep 2010
    • 958

    #2
    This is possibly as outdated as the Visual Studio guide, since it's been years since I did anything with the code, but these are the instructions I followed to get it working in an older version of CodeBlocks:

    1. Download the source from the homepage at http://rephial.org or clone the
    git repostitory at https://github.com/angband/angband.

    2. Select "File->New->Project" from the menu, and then select 'Empty Project'.
    Set your project title, folder and name for the executable. Click next.

    3. Uncheck "Create 'Debug' configuration" to just make a Release version.
    Click finish.

    4. Extract/copy the source code into the project directory. Make sure that
    the src directory is in the same directory as the .cbp file, rather than
    in another subdirectory.

    5. Copy libpng.dll and zlib1.dll from src\win\dll\ to the project directory.

    6. Select "Project -> Properties" from the menu. Switch to the "Build targets" tab.
    Set type to "GUI application". Change the the "Output filename" setting from
    "bin\Release\<filename>.exe" to just "<filename>.exe" to make it build directly in
    the base directory so you don't have to move the file.

    7. Select "Project -> Build options" from the menu. In the "Search directories"
    tab, add: src, src\win, src\win\include.

    8. Switch to the "Linker settings" tab. In the Link libraries box, add:

    src\win\lib\zlib.lib
    src\win\lib\libpng.lib
    libcomdlg32.a
    libmsimg32.a
    libwinmm.a
    libgdi32.a

    9. Still in "Linker settings", add "-mwmindows" in the "Other linker options" box.
    (This stops you getting an additional console Window when you launch Angband.)

    10. Select "Project-> Add Files" from the menu. Set the view to "Arrange by: Folder".
    Open src, select all .c and .h files apart from "snd-sdl.c" and any 'main' file
    other than 'main-win.c'. Click open, and hit okay to close the dialog.

    11. Using the same procedure, add all ".c" and ".h" files from src\monster,
    src\object and src\player.

    12. From the src\win directory, add all ".c" and ".h" files, plus "angband.rc".

    13. Add all ".h" files from "src\win\include" and "src\win\include\libpng12"

    14. Open the "src\z-queue.h" file. Comment out the MSVC-specific line
    "typedef unsigned int * uintptr_t;" with /* */

    15. Save the project, and select "Build -> Build" to build it.
    (Sorry, I can't give any further guidance if any of this no longer works, but I hope that it's some help anyway.)

    Comment

    • roughtyper
      Rookie
      • Aug 2016
      • 1

      #3
      Originally posted by Nekoninja
      This is my first time attempting to build Angband. I have both Visual Studio 2016 and Codeblocks 16.01 version. I found a instruction on how to build Angband with Visual Studio but I think it may be outdated due to changing Visual Studio versions. Is there anyoine who have successful build Angband with VS 2016 or Codeblocks cuz I would like the project files to get starting.

      I have successfully git Angband from GitHub. Just that building the source is my obstacle for now.

      Any help would be greatly appreciates, not only for me but others as well.
      I am doing the same. Any progress in the last few months?

      Most on-line instructions are for far, far older versions of Visual Studio.

      We seem to be strangers in a strange land.

      Comment

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