Compiling Angband help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Surge
    Rookie
    • Aug 2014
    • 7

    Compiling Angband help

    I am trying to compile a modified version of 3.3.2 with minGW but I keep running into some errors.
    Any help is appreciated.
    Attached Files
  • takkaria
    Veteran
    • Apr 2007
    • 1895

    #2
    Originally posted by Surge
    I am trying to compile a modified version of 3.3.2 with minGW but I keep running into some errors.
    Any help is appreciated.
    Do you want to compile the Windows version? Try using the Windows makefile, with 'make -f Makefile.win'
    takkaria whispers something about options. -more-

    Comment

    • Timo Pietilä
      Prophet
      • Apr 2007
      • 3964

      #3
      Originally posted by Surge
      I am trying to compile a modified version of 3.3.2 with minGW but I keep running into some errors.
      Any help is appreciated.
      An old version of the MinGW has a pretty short path limit. I think your source might simply be in too long path. Don't know if this is still issue with mingw.

      Comment

      • kandrc
        Swordsman
        • Dec 2007
        • 299

        #4
        I'm pretty sure mingw doesn't have pwd.h, since it's POSIX. Use cygwin instead.

        Comment

        • Surge
          Rookie
          • Aug 2014
          • 7

          #5
          I tried to use cygwin, but I still get a error.
          Attached Files

          Comment

          • Timo Pietilä
            Prophet
            • Apr 2007
            • 3964

            #6
            Originally posted by Surge
            I tried to use cygwin, but I still get a error.
            Picture is too small to make any sense. Try a bit bigger picture.
            Attached Files

            Comment

            • Nick
              Vanilla maintainer
              • Apr 2007
              • 9351

              #7
              So my method is
              • Use MinGW
              • From the top directory, cd into src
              • run
                Code:
                MINGW=yes make -f Makefile.win

              and it all should just work.
              One for the Dark Lord on his dark throne
              In the Land of Mordor where the Shadows lie.

              Comment

              • Surge
                Rookie
                • Aug 2014
                • 7

                #8
                I am still getting an error. Is this code written in c++ and how do I make the image bigger? The image is the size of my desktop and yet when I attach it, its micro sized. :/

                Well anyways this is what I get:

                $ MINGW=yes make -f Makefile.win
                gcc -DWINDOWS -static -Iwin/include -Lwin/lib -Wall -Wextra -Wno-unused-parameter
                -Wno-missing-field-initalizers -std=c99 -Wdeclaration-after-statement -02 -I. -c -o attack.o attack.c
                cc1.exe: error: unrecognized command line option "-Wno-missing-field-initializers"
                make: *** [attack.o] Error 1
                Attached Files
                Last edited by Surge; August 25, 2015, 17:49.

                Comment

                • kandrc
                  Swordsman
                  • Dec 2007
                  • 299

                  #9
                  Edit Makefile.win, find "-Wno-missing-field-initializers" and delete it. All it does is tell the compiler not to print certain kinds of warnings.

                  Comment

                  • Surge
                    Rookie
                    • Aug 2014
                    • 7

                    #10
                    That gives me a pretty big error log lol

                    ./cave.h:13: error: previous declaration of 'los' was here
                    monster/mon-util.h:37: error: 'los' redeclared as different kind of symbol
                    ./cave.h:13: error: previous declaration of 'los' was here
                    monster/mon-util.h:37: warning: data definition has no type or storage class
                    monster/mon-util.h:38: error: parse error before "los_asleep"
                    monster/mon-util.h:38: warning: type defaults to `int' in declaration of `los_as
                    leep'
                    monster/mon-util.h:38: warning: data definition has no type or storage class
                    monster/mon-util.h:39: error: parse error before "attr"
                    monster/mon-util.h:39: warning: type defaults to `int' in declaration of `attr'
                    monster/mon-util.h:39: warning: data definition has no type or storage class
                    monster/mon-util.h:40: warning: type defaults to `int' in declaration of `monste
                    r_vis'
                    monster/mon-util.h:40: warning: data definition has no type or storage class
                    monster/mon-util.h:49: error: parse error before '*' token
                    monster/mon-util.h:49: warning: type defaults to `int' in declaration of `lookup
                    _monster_base'
                    monster/mon-util.h:49: warning: data definition has no type or storage class
                    monster/mon-util.h:50: error: parse error before '*' token
                    monster/mon-util.h:52: warning: type defaults to `int' in declaration of `monste
                    r_type'
                    monster/mon-util.h:52: error: parse error before '*' token
                    monster/mon-util.h:55: error: parse error before "object_type"
                    In file included from attack.c:27:
                    monster/mon-timed.h:41: error: parse error before "u16b"
                    monster/mon-timed.h:42: error: parse error before "u16b"
                    monster/mon-timed.h:43: error: parse error before "u16b"
                    In file included from attack.c:29:
                    object/slays.h:37: error: parse error before "u16b"
                    object/slays.h:37: warning: no semicolon at end of struct or union
                    object/slays.h:47: error: parse error before '}' token
                    object/slays.h:54: error: parse error before "bitflag"
                    object/slays.h:54: warning: no semicolon at end of struct or union
                    object/slays.h:55: error: conflicting types for 'value'
                    ./z-type.h:45: error: previous declaration of 'value' was here
                    object/slays.h:56: error: parse error before '}' token
                    object/slays.h:60: error: parse error before '*' token
                    object/slays.h:61: warning: type defaults to `int' in declaration of `bitflag'
                    object/slays.h:61: error: parse error before "mask"
                    object/slays.h:62: warning: type defaults to `int' in declaration of `bitflag'
                    object/slays.h:62: error: parse error before "flags"
                    object/slays.h:64: error: parse error before '*' token
                    object/slays.h:65: error: parse error before '*' token
                    object/slays.h:67: error: parse error before '*' token
                    object/slays.h:69: error: parse error before '*' token
                    object/slays.h:70: error: parse error before '*' token
                    attack.c:48: warning: type defaults to `int' in declaration of `object_type'
                    attack.c:48: error: parse error before '*' token
                    attack.c: In function `breakage_chance':
                    attack.c:49: error: `o_ptr' undeclared (first use in this function)
                    attack.c:49: error: (Each undeclared identifier is reported only once
                    attack.c:49: error: for each function it appears in.)
                    attack.c:52: error: `hit_target' undeclared (first use in this function)
                    attack.c: At top level:
                    attack.c:84: error: parse error before "u32b"
                    attack.c: In function `critical_shot':
                    attack.c:85: error: request for member `state' in something not a structure or u
                    nion
                    attack.c:85: error: `plus' undeclared (first use in this function)
                    attack.c:85: error: request for member `lev' in something not a structure or uni
                    on
                    attack.c:89: error: `msg_type' undeclared (first use in this function)
                    attack.c:90: error: `dam' undeclared (first use in this function)
                    attack.c: At top level:
                    attack.c:112: error: parse error before "u32b"
                    attack.c: In function `critical_norm':
                    attack.c:113: error: request for member `state' in something not a structure or
                    union
                    attack.c:113: error: `plus' undeclared (first use in this function)
                    attack.c:113: error: request for member `lev' in something not a structure or un
                    ion
                    attack.c:117: error: `msg_type' undeclared (first use in this function)
                    attack.c:118: error: `dam' undeclared (first use in this function)
                    attack.c: In function `py_attack_real':
                    attack.c:148: error: `m_ptr' undeclared (first use in this function)
                    attack.c:148: error: dereferencing pointer to incomplete type
                    attack.c:149: error: `r_ptr' undeclared (first use in this function)
                    attack.c:150: warning: ISO C90 forbids mixed declarations and code
                    attack.c:154: error: `o_ptr' undeclared (first use in this function)
                    attack.c:154: error: request for member `inventory' in something not a structure
                    or union
                    attack.c:157: error: request for member `state' in something not a structure or
                    union
                    attack.c:157: warning: ISO C90 forbids mixed declarations and code
                    attack.c:158: error: request for member `state' in something not a structure or
                    union
                    attack.c:165: error: parse error before "msg_type"
                    attack.c:174: error: dereferencing pointer to incomplete type
                    attack.c:174: warning: passing arg 1 of `health_track' from incompatible pointer
                    type
                    attack.c:177: error: request for member `state' in something not a structure or
                    union
                    attack.c:183: error: dereferencing pointer to incomplete type
                    attack.c:205: error: request for member `inventory' in something not a structure
                    or union
                    attack.c:206: error: dereferencing pointer to incomplete type
                    attack.c:212: error: dereferencing pointer to incomplete type
                    attack.c:215: error: dereferencing pointer to incomplete type
                    attack.c:218: error: `msg_type' undeclared (first use in this function)
                    attack.c:223: error: request for member `state' in something not a structure or
                    union
                    attack.c:225: warning: passing arg 1 of `wieldeds_notice_flag' from incompatible
                    pointer type
                    attack.c:233: error: request for member `state' in something not a structure or
                    union
                    attack.c:255: error: request for member `wizard' in something not a structure or
                    union
                    attack.c:259: error: request for member `confusing' in something not a structure
                    or union
                    attack.c:260: error: request for member `confusing' in something not a structure
                    or union
                    attack.c:263: error: dereferencing pointer to incomplete type
                    attack.c:264: error: request for member `lev' in something not a structure or un
                    ion
                    attack.c:268: error: dereferencing pointer to incomplete type
                    attack.c:275: error: request for member `py' in something not a structure or uni
                    on
                    attack.c:275: error: request for member `px' in something not a structure or uni
                    on
                    attack.c:276: error: dereferencing pointer to incomplete type
                    attack.c: In function `py_attack':
                    attack.c:292: error: request for member `state' in something not a structure or
                    union
                    attack.c:295: error: `m_ptr' undeclared (first use in this function)
                    attack.c:295: error: dereferencing pointer to incomplete type
                    attack.c:298: warning: passing arg 1 of `disturb' from incompatible pointer type

                    attack.c:301: error: request for member `energy_use' in something not a structur
                    e or union
                    attack.c:305: error: request for member `energy' in something not a structure or
                    union
                    attack.c:307: error: request for member `energy_use' in something not a structur
                    e or union
                    attack.c:308: error: request for member `energy_use' in something not a structur
                    e or union
                    attack.c:316: error: dereferencing pointer to incomplete type
                    attack.c: In function `ranged_helper':
                    attack.c:330: error: `o_ptr' undeclared (first use in this function)
                    attack.c:332: warning: ISO C90 forbids mixed declarations and code
                    attack.c:333: error: parse error before "missile_attr"
                    attack.c:336: error: parse error before "object_type_body"
                    attack.c:337: error: `i_ptr' undeclared (first use in this function)
                    attack.c:337: error: `object_type_body' undeclared (first use in this function)
                    attack.c:339: warning: ISO C90 forbids mixed declarations and code
                    attack.c:342: error: parse error before "path_g"
                    attack.c:344: error: request for member `delay_factor' in something not a struct
                    ure or union
                    attack.c:347: error: request for member `px' in something not a structure or uni
                    on
                    attack.c:348: error: request for member `py' in something not a structure or uni
                    on
                    attack.c:378: error: request for member `energy_use' in something not a structur
                    e or union
                    attack.c:381: error: `path_g' undeclared (first use in this function)
                    attack.c:384: warning: passing arg 1 of `handle_stuff' from incompatible pointer
                    type
                    attack.c:387: error: request for member `px' in something not a structure or uni
                    on
                    attack.c:388: error: request for member `py' in something not a structure or uni
                    on
                    attack.c:396: error: dereferencing pointer to incomplete type
                    attack.c:403: error: dereferencing pointer to incomplete type
                    attack.c:404: error: `missile_attr' undeclared (first use in this function)
                    attack.c:408: error: request for member `redraw' in something not a structure or
                    union
                    attack.c:408: warning: passing arg 1 of `redraw_stuff' from incompatible pointer
                    type
                    attack.c:414: error: request for member `redraw' in something not a structure or
                    union
                    attack.c:414: warning: passing arg 1 of `redraw_stuff' from incompatible pointer
                    type
                    attack.c:421: error: dereferencing pointer to incomplete type
                    attack.c:425: error: dereferencing pointer to incomplete type
                    attack.c:426: error: `m_ptr' undeclared (first use in this function)
                    attack.c:426: error: dereferencing pointer to incomplete type
                    attack.c:427: error: `r_ptr' undeclared (first use in this function)
                    attack.c:428: warning: ISO C90 forbids mixed declarations and code
                    attack.c:434: error: variable `result' has initializer but incomplete type
                    attack.c:434: error: invalid use of undefined type `struct attack_result'
                    attack.c:434: error: storage size of 'result' isn't known
                    attack.c:436: error: parse error before "msg_type"
                    attack.c:458: error: `msg_type' undeclared (first use in this function)
                    attack.c:472: error: dereferencing pointer to incomplete type
                    attack.c:472: warning: passing arg 1 of `health_track' from incompatible pointer
                    type
                    attack.c:476: error: request for member `wizard' in something not a structure or
                    union
                    attack.c:480: error: dereferencing pointer to incomplete type
                    attack.c:481: error: dereferencing pointer to incomplete type
                    attack.c:483: error: dereferencing pointer to incomplete type
                    attack.c:434: warning: unused variable `result'
                    attack.c: At top level:
                    attack.c:514: error: parse error before '*' token
                    attack.c:514: error: return type is an incomplete type
                    attack.c: In function `make_ranged_shot':
                    attack.c:515: error: variable `result' has initializer but incomplete type
                    attack.c:515: warning: excess elements in struct initializer
                    attack.c:515: warning: (near initialization for `result')
                    attack.c:515: warning: excess elements in struct initializer
                    attack.c:515: warning: (near initialization for `result')
                    attack.c:515: warning: excess elements in struct initializer
                    attack.c:515: warning: (near initialization for `result')
                    attack.c:515: warning: excess elements in struct initializer
                    attack.c:515: warning: (near initialization for `result')
                    attack.c:515: error: storage size of 'result' isn't known
                    attack.c:517: error: `j_ptr' undeclared (first use in this function)
                    attack.c:517: error: request for member `inventory' in something not a structure
                    or union
                    attack.c:519: error: `m_ptr' undeclared (first use in this function)
                    attack.c:519: error: dereferencing pointer to incomplete type
                    attack.c:519: error: `x' undeclared (first use in this function)
                    attack.c:520: error: `r_ptr' undeclared (first use in this function)
                    attack.c:522: error: request for member `state' in something not a structure or
                    union
                    attack.c:522: error: `o_ptr' undeclared (first use in this function)
                    attack.c:522: warning: ISO C90 forbids mixed declarations and code
                    attack.c:523: error: request for member `state' in something not a structure or
                    union
                    attack.c:524: error: request for member `py' in something not a structure or uni
                    on
                    attack.c:524: error: request for member `px' in something not a structure or uni
                    on
                    attack.c:526: error: request for member `state' in something not a structure or
                    union
                    attack.c:530: warning: `return' with a value, in function returning void
                    attack.c:539: error: dereferencing pointer to incomplete type
                    attack.c:540: error: dereferencing pointer to incomplete type
                    attack.c:549: error: request for member `inventory' in something not a structure
                    or union
                    attack.c:551: warning: `return' with a value, in function returning void
                    attack.c:515: warning: unused variable `result'
                    attack.c: At top level:
                    attack.c:558: error: parse error before '*' token
                    attack.c:558: error: return type is an incomplete type
                    attack.c: In function `make_ranged_throw':
                    attack.c:559: error: variable `result' has initializer but incomplete type
                    attack.c:559: warning: excess elements in struct initializer
                    attack.c:559: warning: (near initialization for `result')
                    attack.c:559: warning: excess elements in struct initializer
                    attack.c:559: warning: (near initialization for `result')
                    attack.c:559: warning: excess elements in struct initializer
                    attack.c:559: warning: (near initialization for `result')
                    attack.c:559: warning: excess elements in struct initializer
                    attack.c:559: warning: (near initialization for `result')
                    attack.c:559: error: storage size of 'result' isn't known
                    attack.c:561: error: `m_ptr' undeclared (first use in this function)
                    attack.c:561: error: dereferencing pointer to incomplete type
                    attack.c:561: error: `x' undeclared (first use in this function)
                    attack.c:562: error: `r_ptr' undeclared (first use in this function)
                    attack.c:564: error: request for member `state' in something not a structure or
                    union
                    attack.c:564: error: `o_ptr' undeclared (first use in this function)
                    attack.c:564: warning: ISO C90 forbids mixed declarations and code
                    attack.c:565: error: request for member `state' in something not a structure or
                    union
                    attack.c:566: error: request for member `py' in something not a structure or uni
                    on
                    attack.c:566: error: request for member `px' in something not a structure or uni
                    on
                    attack.c:572: warning: `return' with a value, in function returning void
                    attack.c:580: error: dereferencing pointer to incomplete type
                    attack.c:581: error: dereferencing pointer to incomplete type
                    attack.c:590: warning: `return' with a value, in function returning void
                    attack.c:559: warning: unused variable `result'
                    attack.c: In function `do_cmd_fire':
                    attack.c:600: error: request for member `state' in something not a structure or
                    union
                    attack.c:601: error: request for member `state' in something not a structure or
                    union
                    attack.c:603: warning: initialization from incompatible pointer type
                    attack.c:605: error: `j_ptr' undeclared (first use in this function)
                    attack.c:605: error: request for member `inventory' in something not a structure
                    or union
                    attack.c:606: error: `o_ptr' undeclared (first use in this function)
                    attack.c:609: error: request for member `state' in something not a structure or
                    union
                    attack.c:621: error: request for member `state' in something not a structure or
                    union
                    attack.c: In function `do_cmd_throw':
                    attack.c:638: error: `o_ptr' undeclared (first use in this function)
                    attack.c:639: warning: ISO C90 forbids mixed declarations and code
                    attack.c:640: error: request for member `state' in something not a structure or
                    union
                    attack.c:643: warning: initialization from incompatible pointer type
                    attack.c: In function `textui_cmd_fire_at_nearest':
                    attack.c:695: error: request for member `inventory' in something not a structure
                    or union
                    attack.c:695: error: request for member `state' in something not a structure or
                    union
                    attack.c:702: error: request for member `inventory' in something not a structure
                    or union
                    attack.c:702: error: request for member `state' in something not a structure or
                    union
                    attack.c: At top level:
                    z-term.h:336: error: storage size of `keylog' isn't known
                    monster/monster.h:166: error: storage size of `blow' isn't known
                    make: *** [attack.o] Error 1

                    Happy@Carbibe-Steel /c/users/happy/desktop/angband-v3.3.2/src
                    $

                    Comment

                    • Nick
                      Vanilla maintainer
                      • Apr 2007
                      • 9351

                      #11
                      My guess is that something is missing in your MinGW setup - but I'm no expert on that.
                      One for the Dark Lord on his dark throne
                      In the Land of Mordor where the Shadows lie.

                      Comment

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