Menu

Compile error

Anonymous
2017-12-20
2018-06-08
  • Anonymous

    Anonymous - 2017-12-20

    I don't know much about c, but I was trying to compile the game anyway but i keep getting an error when i try. I am on ubuntu 16.04. I Think i installed all the dependencys, as i got threw the other steps without errors. I also tried diffrent early versions to see if those would compile but that didnt work either.

    I always loved the kings bounty game and was hoping to at least see how far this attempt has gotten. If anyone can help me compile and test the game I am a somewhat skilled graphic artist and i could help finish up the graphics for the game.

    This it the output that the terminal gave me when i was trying to compile using the make command.
    error apears to be with the auto-battle funtions.

    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/game.c -o src/game.o
    src/game.c: In function ‘lay_siege’:
    src/game.c:2493:3: warning: implicit declaration of function ‘run_combat’ [-Wimplicit-function-declaration]
    run_combat(game, 1, id);
    ^
    In file included from src/game.c:36:0:
    src/game.c: In function ‘visit_town’:
    src/game.c:2634:45: warning: implicit declaration of function ‘boat_cost’ [-Wimplicit-function-declaration]
    KB_iprintf("B) Rent boat (%d week) \n", boat_cost(game));
    ^
    src/env.h:110:47: note: in definition of macro ‘KB_iprintf’
    #define KB_iprintf(ARGS...) KB_printf(sys, ## ARGS)
    ^
    src/game.c: In function ‘take_chest’:
    src/game.c:3100:2: warning: implicit declaration of function ‘KB_play’ [-Wimplicit-function-declaration]
    KB_play(sys, snd_chest);
    ^
    src/game.c: In function ‘hit_unit’:
    src/game.c:3425:2: warning: implicit declaration of function ‘compact_units’ [-Wimplicit-function-declaration]
    compact_units(war);
    ^
    src/game.c: In function ‘run_combat’:
    src/game.c:3520:4: warning: implicit declaration of function ‘accept_units_castle’ [-Wimplicit-function-declaration]
    accept_units_castle(game, 1, &combat, id);
    ^
    src/game.c:3527:4: warning: implicit declaration of function ‘accept_units_foe’ [-Wimplicit-function-declaration]
    accept_units_foe(game, 1, &combat, game->continent, id);
    ^
    src/game.c: In function ‘accept_foe’:
    src/game.c:3580:2: warning: implicit declaration of function ‘roll_creature’ [-Wimplicit-function-declaration]
    roll_creature(game->continent, &troop_id, &troop_count);
    ^
    src/game.c:3616:3: warning: implicit declaration of function ‘add_troop’ [-Wimplicit-function-declaration]
    add_troop(game, troop_id, troop_count);
    ^
    src/game.c: In function ‘end_of_week’:
    src/game.c:3688:18: warning: implicit declaration of function ‘week_id’ [-Wimplicit-function-declaration]
    byte week_num = week_id(game) - num;
    ^
    In file included from src/game.c:36:0:
    src/game.c:3728:28: warning: implicit declaration of function ‘player_has_boat’ [-Wimplicit-function-declaration]
    KB_iprintf("Boat % 6d", player_has_boat(game) ? boat_cost(game) : 0);
    ^
    src/env.h:110:47: note: in definition of macro ‘KB_iprintf’
    #define KB_iprintf(ARGS...) KB_printf(sys, ## ARGS)
    ^
    src/game.c: In function ‘clone_army’:
    src/game.c:3880:7: warning: implicit declaration of function ‘pick_target’ [-Wimplicit-function-declaration]
    ok = pick_target(war, &x, &y, 3);
    ^
    src/game.c: In function ‘debug_cheat_menu’:
    src/game.c:4923:4: error: ‘auto_battle’ undeclared (first use in this function)
    auto_battle = 1 - auto_battle;
    ^
    src/game.c:4923:4: note: each undeclared identifier is reported only once for each function it appears in
    src/game.c:4945:14: warning: ‘return’ with no value, in function returning non-void
    if (!txt) return;
    ^
    src/game.c:4962:27: warning: ‘return’ with no value, in function returning non-void
    if (troop_id == 0xFF) return;
    ^
    src/game.c:4969:14: warning: ‘return’ with no value, in function returning non-void
    if (!txt) return;
    ^
    src/game.c:4975:4: warning: ‘return’ with no value, in function returning non-void
    return;
    ^
    src/game.c:4988:4: warning: ‘return’ with no value, in function returning non-void
    return;
    ^
    src/game.c:4992:4: warning: ‘return’ with no value, in function returning non-void
    return;
    ^
    src/game.c: In function ‘combat_loop’:
    src/game.c:6036:5: error: ‘auto_battle’ undeclared (first use in this function)
    (auto_battle || combat->side != 0 || combat->units[combat->side][combat->unit_id].out_of_control))
    ^
    src/game.c: In function ‘adventure_loop’:
    src/game.c:6551:5: warning: implicit declaration of function ‘foes_follow’ [-Wimplicit-function-declaration]
    foes_follow(game);
    ^
    src/game.c: In function ‘run_game’:
    src/game.c:6625:2: warning: implicit declaration of function ‘register_modules’ [-Wimplicit-function-declaration]
    register_modules(conf);
    ^
    In file included from src/game.c:36:0:
    src/game.c: At top level:
    src/env.h:101:13: warning: inline function ‘KB_getpos’ declared but never defined
    inline void KB_getpos(KBenv env, word x, word y);
    ^
    src/env.h:100:13: warning: inline function ‘KB_lh’ declared but never defined
    inline void KB_lh(KBenv
    env, byte h);
    ^
    src/env.h:99:13: warning: inline function ‘KB_curs’ declared but never defined
    inline void KB_curs(KBenv env, word cursor_x, word cursor_y);
    ^
    src/env.h:98:13: warning: inline function ‘KB_loc’ declared but never defined
    inline void KB_loc(KBenv
    env, word base_x, word base_y);
    ^
    In file included from src/game.c:29:0:
    src/lib/kbres.h:305:13: warning: inline function ‘SDL_ClonePalette’ declared but never defined
    inline void SDL_ClonePalette(SDL_Surface dst, SDL_Surface src);
    ^
    src/lib/kbres.h:304:21: warning: inline function ‘SDL_CreatePALSurface’ declared but never defined
    inline SDL_Surface SDL_CreatePALSurface(Uint32 width, Uint32 height);
    ^
    In file included from src/game.c:26:0:
    src/ui.h:186:13: warning: inline function ‘KB_Pause’ declared but never defined
    inline void KB_Pause();
    ^
    src/ui.h:185:13: warning: inline function ‘KB_Wait’ declared but never defined
    inline void KB_Wait();
    ^
    Makefile:94: recipe for target 'src/game.o' failed
    make:
    ** [src/game.o] Error 1

     
  • Aurora Nikolaeva

    I, too, have compile errors. When I input make, it drops out with an error in the libhtfs directory, says it cannot find the make file (make: * [Makefile:77: vendor/libhfs.a] Error 2). The make vendor step displays a lot of warnings but no errors.

    The OS is Gentoo 32 bit, more or less current.

     

    Last edit: Aurora Nikolaeva 2018-01-05
  • Anonymous

    Anonymous - 2018-01-10

    still get an error when i try to compile the newest version. Does it work when you try and compile it, because i could just have a diffrent version of whatever software compiles the game.

    alexander@alexander-Ubuntu:~/Desktop/openkb-code-2f0a22bdd943b0f16c5db5da52fdccc806e9f404$ ./autogen.sh
    Clearing cache...
    Running autoheader
    Running aclocal
    Running autoconf [twice]
    Running automake --add-mising (to get install-sh)
    You can run './configure' now
    alexander@alexander-Ubuntu:~/Desktop/openkb-code-2f0a22bdd943b0f16c5db5da52fdccc806e9f404$ ./configure
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking for a BSD-compatible install... /usr/bin/install -c
    checking for sdl-config... /usr/bin/sdl-config
    checking for SDL_Init in -lSDL... yes
    checking for IMG_Load in -lSDL_image... yes
    checking for SDLNet_Init in -lSDL_net... no
    checking for png_create_write_struct in -lpng... yes
    checking how to run the C preprocessor... gcc -E
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for string.h... (cached) yes
    checking malloc.h usability... yes
    checking malloc.h presence... yes
    checking for malloc.h... yes
    checking endian.h usability... yes
    checking endian.h presence... yes
    checking for endian.h... yes
    checking for inline... inline
    checking for size_t... yes
    checking for stdlib.h... (cached) yes
    checking for GNU libc compatible malloc... yes
    checking for isascii... yes
    checking for mkdir... yes
    checking for strcasecmp... yes
    checking for strlcpy... no
    checking for strlcat... no
    checking for strdup... yes
    checking for getcwd... yes
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating src/config.h
    alexander@alexander-Ubuntu:~/Desktop/openkb-code-2f0a22bdd943b0f16c5db5da52fdccc806e9f404$ make vendor
    vendor/drop.sh vendor/
    Cloning into 'vendor/SDL_inprint'...
    remote: Counting objects: 126, done.
    remote: Total 126 (delta 0), reused 0 (delta 0), pack-reused 126
    Receiving objects: 100% (126/126), 26.60 KiB | 0 bytes/s, done.
    Resolving deltas: 100% (69/69), done.
    Checking connectivity... done.
    Cloning into 'vendor/SDL_SavePNG'...
    remote: Counting objects: 56, done.
    remote: Total 56 (delta 0), reused 0 (delta 0), pack-reused 56
    Receiving objects: 100% (56/56), 11.20 KiB | 0 bytes/s, done.
    Resolving deltas: 100% (28/28), done.
    Checking connectivity... done.
    tar: A lone zero block at 2060
    alexander@alexander-Ubuntu:~/Desktop/openkb-code-2f0a22bdd943b0f16c5db5da52fdccc806e9f404$ make
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/main.c -o src/main.o
    src/main.c: In function ‘main’:
    src/main.c:62:2: warning: implicit declaration of function ‘KB_logto_STD’ [-Wimplicit-function-declaration]
    KB_logto_STD();
    ^
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/save.c -o src/save.o
    src/save.c: In function ‘KB_loadDAT’:
    src/save.c:274:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
    fprintf(stdout, "Save file: %d bytes (needed %d)\n", p - &buf[0], DAT_SIZE);
    ^
    src/save.c: In function ‘KB_loadDAT_amiga’:
    src/save.c:534:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
    fprintf(stdout, "Save file: %d bytes (needed %d)\n", p - &buf[0], DAT_SIZE);
    ^
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/game.c -o src/game.o
    src/game.c: In function ‘lay_siege’:
    src/game.c:2498:3: warning: implicit declaration of function ‘run_combat’ [-Wimplicit-function-declaration]
    run_combat(game, 1, id);
    ^
    In file included from src/game.c:36:0:
    src/game.c: In function ‘visit_town’:
    src/game.c:2638:45: warning: implicit declaration of function ‘boat_cost’ [-Wimplicit-function-declaration]
    KB_iprintf("B) Rent boat (%d week) \n", boat_cost(game));
    ^
    src/env.h:110:47: note: in definition of macro ‘KB_iprintf’
    #define KB_iprintf(ARGS...) KB_printf(sys, ## ARGS)
    ^
    src/game.c: In function ‘take_chest’:
    src/game.c:3104:2: warning: implicit declaration of function ‘KB_play’ [-Wimplicit-function-declaration]
    KB_play(sys, snd_chest);
    ^
    src/game.c: In function ‘hit_unit’:
    src/game.c:3429:2: warning: implicit declaration of function ‘compact_units’ [-Wimplicit-function-declaration]
    compact_units(war);
    ^
    src/game.c: In function ‘run_combat’:
    src/game.c:3524:4: warning: implicit declaration of function ‘accept_units_castle’ [-Wimplicit-function-declaration]
    accept_units_castle(game, 1, &combat, id);
    ^
    src/game.c:3531:4: warning: implicit declaration of function ‘accept_units_foe’ [-Wimplicit-function-declaration]
    accept_units_foe(game, 1, &combat, game->continent, id);
    ^
    src/game.c: In function ‘accept_foe’:
    src/game.c:3584:2: warning: implicit declaration of function ‘roll_creature’ [-Wimplicit-function-declaration]
    roll_creature(game->continent, &troop_id, &troop_count);
    ^
    src/game.c:3620:3: warning: implicit declaration of function ‘add_troop’ [-Wimplicit-function-declaration]
    add_troop(game, troop_id, troop_count);
    ^
    src/game.c: In function ‘end_of_week’:
    src/game.c:3692:18: warning: implicit declaration of function ‘week_id’ [-Wimplicit-function-declaration]
    byte week_num = week_id(game) - num;
    ^
    In file included from src/game.c:36:0:
    src/game.c:3732:28: warning: implicit declaration of function ‘player_has_boat’ [-Wimplicit-function-declaration]
    KB_iprintf("Boat % 6d", player_has_boat(game) ? boat_cost(game) : 0);
    ^
    src/env.h:110:47: note: in definition of macro ‘KB_iprintf’
    #define KB_iprintf(ARGS...) KB_printf(sys, ## ARGS)
    ^
    src/game.c: In function ‘clone_army’:
    src/game.c:3884:7: warning: implicit declaration of function ‘pick_target’ [-Wimplicit-function-declaration]
    ok = pick_target(war, &x, &y, 3);
    ^
    src/game.c: In function ‘debug_cheat_menu’:
    src/game.c:4949:14: warning: ‘return’ with no value, in function returning non-void
    if (!txt) return;
    ^
    src/game.c:4966:27: warning: ‘return’ with no value, in function returning non-void
    if (troop_id == 0xFF) return;
    ^
    src/game.c:4973:14: warning: ‘return’ with no value, in function returning non-void
    if (!txt) return;
    ^
    src/game.c:4979:4: warning: ‘return’ with no value, in function returning non-void
    return;
    ^
    src/game.c:4992:4: warning: ‘return’ with no value, in function returning non-void
    return;
    ^
    src/game.c:4996:4: warning: ‘return’ with no value, in function returning non-void
    return;
    ^
    src/game.c: In function ‘adventure_loop’:
    src/game.c:6559:5: warning: implicit declaration of function ‘foes_follow’ [-Wimplicit-function-declaration]
    foes_follow(game);
    ^
    src/game.c: In function ‘run_game’:
    src/game.c:6633:2: warning: implicit declaration of function ‘register_modules’ [-Wimplicit-function-declaration]
    register_modules(conf);
    ^
    In file included from src/game.c:36:0:
    src/game.c: At top level:
    src/env.h:101:13: warning: inline function ‘KB_getpos’ declared but never defined
    inline void KB_getpos(KBenv env, word x, word y);
    ^
    src/env.h:100:13: warning: inline function ‘KB_lh’ declared but never defined
    inline void KB_lh(KBenv
    env, byte h);
    ^
    src/env.h:99:13: warning: inline function ‘KB_curs’ declared but never defined
    inline void KB_curs(KBenv env, word cursor_x, word cursor_y);
    ^
    src/env.h:98:13: warning: inline function ‘KB_loc’ declared but never defined
    inline void KB_loc(KBenv
    env, word base_x, word base_y);
    ^
    In file included from src/game.c:29:0:
    src/lib/kbres.h:313:13: warning: inline function ‘SDL_ClonePalette’ declared but never defined
    inline void SDL_ClonePalette(SDL_Surface dst, SDL_Surface src);
    ^
    src/lib/kbres.h:312:21: warning: inline function ‘SDL_CreatePALSurface’ declared but never defined
    inline SDL_Surface SDL_CreatePALSurface(Uint32 width, Uint32 height);
    ^
    In file included from src/game.c:26:0:
    src/ui.h:186:13: warning: inline function ‘KB_Pause’ declared but never defined
    inline void KB_Pause();
    ^
    src/ui.h:185:13: warning: inline function ‘KB_Wait’ declared but never defined
    inline void KB_Wait();
    ^
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/play.c -o src/play.o
    src/play.c: In function ‘prepare_units_player’:
    src/play.c:1069:41: warning: implicit declaration of function ‘unit_under_control’ [-Wimplicit-function-declaration]
    war->units[side][i].out_of_control = !unit_under_control(war, side, i);
    ^
    src/play.c: In function ‘unit_surrounded’:
    src/play.c:1329:7: warning: implicit declaration of function ‘units_are_friendly’ [-Wimplicit-function-declaration]
    if (units_are_friendly(war, side, id, j, i)) continue;
    ^
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/bounty.c -o src/bounty.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/env-sdl.c -o src/env-sdl.o
    src/env-sdl.c: In function ‘KB_startENV’:
    src/env-sdl.c:111:2: warning: implicit declaration of function ‘IMG_Load’ [-Wimplicit-function-declaration]
    IMG_Load(iconfile);
    ^
    src/env-sdl.c:109:13: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
    nsys->icon =
    ^
    src/env-sdl.c: In function ‘STRL_LoadArray’:
    src/env-sdl.c:536:8: warning: implicit declaration of function ‘KB_strlist_max’ [-Wimplicit-function-declaration]
    max = KB_strlist_max(list);
    ^
    src/env-sdl.c: In function ‘KB_play’:
    src/env-sdl.c:670:8: warning: implicit declaration of function ‘tunFile_reset’ [-Wimplicit-function-declaration]
    n = tunFile_reset(snd->data, sys->mixer.format);
    ^
    src/env-sdl.c: In function ‘KBenv_audio_callback’:
    src/env-sdl.c:700:9: warning: implicit declaration of function ‘tunFile_play’ [-Wimplicit-function-declaration]
    n = tunFile_play(snd->data, stream, len, sys->mixer.freq * sys->mixer.chann
    ^
    In file included from src/env-sdl.c:23:0:
    src/env-sdl.c: At top level:
    src/lib/kbres.h:313:13: warning: inline function ‘SDL_ClonePalette’ declared but never defined
    inline void SDL_ClonePalette(SDL_Surface
    dst, SDL_Surface src);
    ^
    src/lib/kbres.h:312:21: warning: inline function ‘SDL_CreatePALSurface’ declared but never defined
    inline SDL_Surface
    SDL_CreatePALSurface(Uint32 width, Uint32 height);
    ^
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/ui.c -o src/ui.o
    src/ui.c: In function ‘SDL_TextRect’:
    src/ui.c:492:2: warning: implicit declaration of function ‘incolor’ [-Wimplicit-function-declaration]
    incolor(fore, back);
    ^
    src/ui.c:496:12: warning: implicit declaration of function ‘inprint’ [-Wimplicit-function-declaration]
    if (top) inprint(dest, "\x0E", i, r->y);
    ^
    In file included from src/ui.c:24:0:
    src/ui.c: At top level:
    src/env.h:101:13: warning: inline function ‘KB_getpos’ declared but never defined
    inline void KB_getpos(KBenv env, word x, word y);
    ^
    src/env.h:100:13: warning: inline function ‘KB_lh’ declared but never defined
    inline void KB_lh(KBenv
    env, byte h);
    ^
    src/env.h:99:13: warning: inline function ‘KB_curs’ declared but never defined
    inline void KB_curs(KBenv env, word cursor_x, word cursor_y);
    ^
    src/env.h:98:13: warning: inline function ‘KB_loc’ declared but never defined
    inline void KB_loc(KBenv
    env, word base_x, word base_y);
    ^
    In file included from src/ui.c:23:0:
    src/lib/kbres.h:313:13: warning: inline function ‘SDL_ClonePalette’ declared but never defined
    inline void SDL_ClonePalette(SDL_Surface dst, SDL_Surface src);
    ^
    src/lib/kbres.h:312:21: warning: inline function ‘SDL_CreatePALSurface’ declared but never defined
    inline SDL_Surface SDL_CreatePALSurface(Uint32 width, Uint32 height);
    ^
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/rogue.c -o src/rogue.o
    In file included from src/rogue.c:20:0:
    src/lib/kbres.h:313:13: warning: inline function ‘SDL_ClonePalette’ declared but never defined
    inline void SDL_ClonePalette(SDL_Surface
    dst, SDL_Surface src);
    ^
    src/lib/kbres.h:312:21: warning: inline function ‘SDL_CreatePALSurface’ declared but never defined
    inline SDL_Surface
    SDL_CreatePALSurface(Uint32 width, Uint32 height);
    ^
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT vendor/strlcat.c -o vendor/strlcat.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT vendor/strlcpy.c -o vendor/strlcpy.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/kbstd.c -o src/lib/kbstd.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/kbconf.c -o src/lib/kbconf.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/kbfile.c -o src/lib/kbfile.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/kbdir.c -o src/lib/kbdir.o
    src/lib/kbdir.c: In function ‘KB_opendir_in’:
    src/lib/kbdir.c:71:7: warning: implicit declaration of function ‘strcasecmp’ [-Wimplicit-function-declaration]
    if (!strcasecmp(ext, "cc")) {
    ^
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/kbres.c -o src/lib/kbres.o
    src/lib/kbres.c: In function ‘KB_LoadIMG’:
    src/lib/kbres.c:309:32: warning: implicit declaration of function ‘imgGroup_filename_to_bpp’ [-Wimplicit-function-declaration]
    surf = DOS_LoadRAWIMG_RW(rw, imgGroup_filename_to_bpp(filename));
    ^
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/free-data.c -o src/lib/free-data.o
    src/lib/free-data.c: In function ‘GNU_string_ini’:
    src/lib/free-data.c:84:3: warning: implicit declaration of function ‘KB_strlist_clear’ [-Wimplicit-function-declaration]
    KB_strlist_clear(dst);
    ^
    In file included from src/lib/free-data.c:22:0:
    src/lib/free-data.c: At top level:
    src/lib/kbres.h:313:13: warning: inline function ‘SDL_ClonePalette’ declared but never defined
    inline void SDL_ClonePalette(SDL_Surface dst, SDL_Surface src);
    ^
    src/lib/kbres.h:312:21: warning: inline function ‘SDL_CreatePALSurface’ declared but never defined
    inline SDL_Surface SDL_CreatePALSurface(Uint32 width, Uint32 height);
    ^
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/dos-data.c -o src/lib/dos-data.o
    src/lib/dos-data.c: In function ‘DOS_read_credits’:
    src/lib/dos-data.c:483:4: warning: implicit declaration of function ‘strlcat’ [-Wimplicit-function-declaration]
    strlcat(buf, "\n", newmax);
    ^
    In file included from src/lib/dos-data.c:24:0:
    src/lib/dos-data.c: At top level:
    src/lib/kbres.h:313:13: warning: inline function ‘SDL_ClonePalette’ declared but never defined
    inline void SDL_ClonePalette(SDL_Surface
    dst, SDL_Surface src);
    ^
    src/lib/kbres.h:312:21: warning: inline function ‘SDL_CreatePALSurface’ declared but never defined
    inline SDL_Surface
    SDL_CreatePALSurface(Uint32 width, Uint32 height);
    ^
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/dos-cc.c -o src/lib/dos-cc.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/dos-img.c -o src/lib/dos-img.o
    In file included from src/lib/dos-img.c:25:0:
    src/lib/kbres.h:313:13: warning: inline function ‘SDL_ClonePalette’ declared but never defined
    inline void SDL_ClonePalette(SDL_Surface dst, SDL_Surface src);
    ^
    src/lib/kbres.h:312:21: warning: inline function ‘SDL_CreatePALSurface’ declared but never defined
    inline SDL_Surface SDL_CreatePALSurface(Uint32 width, Uint32 height);
    ^
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/dos-snd.c -o src/lib/dos-snd.o
    In file included from src/lib/dos-snd.c:23:0:
    src/lib/kbres.h:313:13: warning: inline function ‘SDL_ClonePalette’ declared but never defined
    inline void SDL_ClonePalette(SDL_Surface
    dst, SDL_Surface src);
    ^
    src/lib/kbres.h:312:21: warning: inline function ‘SDL_CreatePALSurface’ declared but never defined
    inline SDL_Surface
    SDL_CreatePALSurface(Uint32 width, Uint32 height);
    ^
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/dos-exe.c -o src/lib/dos-exe.o
    In file included from src/lib/dos-exe.c:25:0:
    src/lib/kbres.h:313:13: warning: inline function ‘SDL_ClonePalette’ declared but never defined
    inline void SDL_ClonePalette(SDL_Surface dst, SDL_Surface src);
    ^
    src/lib/kbres.h:312:21: warning: inline function ‘SDL_CreatePALSurface’ declared but never defined
    inline SDL_Surface SDL_CreatePALSurface(Uint32 width, Uint32 height);
    ^
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/md-rom.c -o src/lib/md-rom.o
    In file included from src/lib/md-rom.c:4:0:
    src/lib/kbres.h:313:13: warning: inline function ‘SDL_ClonePalette’ declared but never defined
    inline void SDL_ClonePalette(SDL_Surface
    dst, SDL_Surface src);
    ^
    src/lib/kbres.h:312:21: warning: inline function ‘SDL_CreatePALSurface’ declared but never defined
    inline SDL_Surface
    SDL_CreatePALSurface(Uint32 width, Uint32 height);
    ^
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/kbauto.c -o src/lib/kbauto.o
    In file included from src/lib/kbauto.c:28:0:
    src/lib/kbres.h:313:13: warning: inline function ‘SDL_ClonePalette’ declared but never defined
    inline void SDL_ClonePalette(SDL_Surface dst, SDL_Surface src);
    ^
    src/lib/kbres.h:312:21: warning: inline function ‘SDL_CreatePALSurface’ declared but never defined
    inline SDL_Surface* SDL_CreatePALSurface(Uint32 width, Uint32 height);
    ^
    make -C vendor/libhfs
    make[1]: Entering directory '/home/alexander/Desktop/openkb-code-2f0a22bdd943b0f16c5db5da52fdccc806e9f404/vendor/libhfs'
    make[1]: No targets specified and no makefile found. Stop.
    make[1]: Leaving directory '/home/alexander/Desktop/openkb-code-2f0a22bdd943b0f16c5db5da52fdccc806e9f404/vendor/libhfs'
    Makefile:77: recipe for target 'vendor/libhfs.a' failed
    make:
    [vendor/libhfs.a] Error 2
    alexander@alexander-Ubuntu:~/Desktop/openkb-code-2f0a22bdd943b0f16c5db5da52fdccc806e9f404$

     
  • alex milar

    alex milar - 2018-01-10

    I am the anonymous user for the original post, and the other comment giving the new terminal error that came up, I just found my account password.
    the error apears to be this line.
    Makefile:77: recipe for target 'vendor/libhfs.a' failed
    that file dosent seem to exist, is it possible that there is a typo and it is looking for the wrong file.

     
    • driedfruit

      driedfruit - 2018-04-05

      Thank you for the report.

      I believe this has been fixed in the latest commit. You might need to (re)run

      make vendor-clean
      make vendor
      

      steps.

      Please give it a go.

       
  • alex milar

    alex milar - 2018-04-26

    This is what i get when i run using make vendor-clear or make vendor. So it still will not compile correctly.

    /home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/src/game.c:4152: undefined reference to KB_Wait' /home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/src/game.c:4222: undefined reference toKB_Pause'
    src/game.o: In function debug_cheat_menu': /home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/src/game.c:5042: undefined reference toKB_Wait'
    src/ui.o: In function KB_MessageBox': /home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/src/ui.c:599: undefined reference toKB_Pause'
    src/ui.o: In function KB_BottomBox': /home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/src/ui.c:659: undefined reference toKB_Pause'
    /home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/src/ui.c:660: undefined reference to KB_Wait' src/ui.o: In functionKB_TopBox':
    /home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/src/ui.c:699: undefined reference to `KB_Wait'
    collect2: error: ld returned 1 exit status
    Makefile:88: recipe for target 'openkb' failed
    make: *** [openkb] Error 1
    alexander@alexander-Ubuntu:~/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code$ clear

    alexander@alexander-Ubuntu:~/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code$ ./autogen.sh
    Clearing cache...
    Running autoheader
    Running aclocal
    Running autoconf [twice]
    Running automake --add-mising (to get install-sh)
    You can run './configure' now
    alexander@alexander-Ubuntu:~/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code$ ./configure
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking for a BSD-compatible install... /usr/bin/install -c
    checking for sdl-config... /usr/bin/sdl-config
    checking for SDL_Init in -lSDL... yes
    checking for IMG_Load in -lSDL_image... yes
    checking for SDLNet_Init in -lSDL_net... no
    checking for png_create_write_struct in -lpng... yes
    checking how to run the C preprocessor... gcc -E
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for string.h... (cached) yes
    checking malloc.h usability... yes
    checking malloc.h presence... yes
    checking for malloc.h... yes
    checking endian.h usability... yes
    checking endian.h presence... yes
    checking for endian.h... yes
    checking for inline... inline
    checking for size_t... yes
    checking for stdlib.h... (cached) yes
    checking for GNU libc compatible malloc... yes
    checking for isascii... yes
    checking for mkdir... yes
    checking for strcasecmp... yes
    checking for strlcpy... no
    checking for strlcat... no
    checking for strdup... yes
    checking for getcwd... yes
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating src/config.h
    config.status: src/config.h is unchanged
    alexander@alexander-Ubuntu:~/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code$ make vendor-clean
    rm vendor/scale2x.c vendor/inprint.c vendor/savepng.c vendor/hfs.h vendor/rsrc.h vendor/libhfs/hfs.c vendor/librsrc/rsrc.c
    alexander@alexander-Ubuntu:~/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code$ make
    vendor/drop.sh vendor/
    tar: A lone zero block at 2060
    cd vendor/libhfs; ./configure; cd ../..
    creating cache ./config.cache
    checking whether make sets ${MAKE}... yes
    checking for gcc... gcc
    checking whether the C compiler (gcc ) works... yes
    checking whether the C compiler (gcc ) is a cross-compiler... no
    checking whether we are using GNU C... yes
    checking whether gcc accepts -g... yes
    checking for a BSD compatible install... /usr/bin/install -c
    checking for ranlib... ranlib
    checking whether ln -s works... yes
    checking how to run the C preprocessor... gcc -E
    checking whether gcc needs -traditional... no
    checking for ANSI C header files... yes
    checking for unistd.h... yes
    checking for fcntl.h... yes
    checking for size_t... yes
    checking whether struct tm is in sys/time.h or time.h... time.h
    checking for working const... yes
    checking for 8-bit clean memcmp... yes
    checking for mktime... yes
    updating cache ./config.cache
    creating ./config.status
    creating Makefile
    creating config.h
    cd vendor/librsrc; ./configure; cd ../..
    creating cache ./config.cache
    checking whether make sets ${MAKE}... yes
    checking for gcc... gcc
    checking whether the C compiler (gcc ) works... yes
    checking whether the C compiler (gcc ) is a cross-compiler... no
    checking whether we are using GNU C... yes
    checking whether gcc accepts -g... yes
    checking for a BSD compatible install... /usr/bin/install -c
    checking for ranlib... ranlib
    checking how to run the C preprocessor... gcc -E
    checking whether gcc needs -traditional... no
    checking for ANSI C header files... yes
    checking for unistd.h... yes
    checking for fcntl.h... yes
    checking for size_t... yes
    checking whether struct tm is in sys/time.h or time.h... time.h
    checking for working const... yes
    checking for mktime... yes
    updating cache ./config.cache
    creating ./config.status
    creating Makefile
    creating config.h
    make -C vendor/libhfs
    make[1]: Entering directory '/home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/vendor/libhfs'
    rm -f os.c
    ln -s os/unix.c os.c
    gcc -g -O2 -DHAVE_CONFIG_H -c -o os.o os.c
    os.c: In function ‘os_open’:
    os.c:86:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    priv = (void ) fd;
    ^
    os.c: In function ‘os_close’:
    os.c:103:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    int fd = (int) priv;
    ^
    os.c: In function ‘os_same’:
    os.c:122:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    int fd = (int)
    priv;
    ^
    os.c: In function ‘os_seek’:
    os.c:142:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    int fd = (int) priv;
    ^
    os.c: In function ‘os_read’:
    os.c:167:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    int fd = (int)
    priv;
    ^
    os.c: In function ‘os_write’:
    os.c:187:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    int fd = (int) priv;
    ^
    gcc -g -O2 -DHAVE_CONFIG_H -c -o data.o data.c
    gcc -g -O2 -DHAVE_CONFIG_H -c -o block.o block.c
    gcc -g -O2 -DHAVE_CONFIG_H -c -o low.o low.c
    gcc -g -O2 -DHAVE_CONFIG_H -c -o medium.o medium.c
    gcc -g -O2 -DHAVE_CONFIG_H -c -o file.o file.c
    gcc -g -O2 -DHAVE_CONFIG_H -c -o btree.o btree.c
    gcc -g -O2 -DHAVE_CONFIG_H -c -o node.o node.c
    gcc -g -O2 -DHAVE_CONFIG_H -c -o record.o record.c
    gcc -g -O2 -DHAVE_CONFIG_H -c -o volume.o volume.c
    gcc -g -O2 -DHAVE_CONFIG_H -c -o hfs.o hfs.c
    gcc -g -O2 -DHAVE_CONFIG_H -c -o version.o version.c
    ar rc libhfs.a os.o data.o block.o low.o medium.o file.o btree.o node.o record.o volume.o hfs.o version.o
    ranlib libhfs.a
    make[1]: Leaving directory '/home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/vendor/libhfs'
    cp vendor/libhfs/libhfs.a vendor/.
    make -C vendor/librsrc
    make[1]: Entering directory '/home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/vendor/librsrc'
    gcc -g -O2 -DHAVE_CONFIG_H -c -o data.o data.c
    gcc -g -O2 -DHAVE_CONFIG_H -c -o rsrc.o rsrc.c
    gcc -g -O2 -DHAVE_CONFIG_H -c -o version.o version.c
    ar rc librsrc.a data.o rsrc.o version.o
    ranlib librsrc.a
    make[1]: Leaving directory '/home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/vendor/librsrc'
    cp vendor/librsrc/librsrc.a vendor/.
    ar rcs src/libkb.a vendor/strlcat.o vendor/strlcpy.o src/lib/kbstd.o src/lib/kbconf.o src/lib/kbfile.o src/lib/kbdir.o src/lib/kbres.o src/lib/free-data.o src/lib/dos-data.o src/lib/dos-cc.o src/lib/dos-img.o src/lib/dos-snd.o src/lib/dos-exe.o src/lib/md-rom.o src/lib/kbauto.o vendor/libhfs.a vendor/librsrc.a
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT vendor/scale2x.c -o vendor/scale2x.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT vendor/inprint.c -o vendor/inprint.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT vendor/savepng.c -o vendor/savepng.o
    gcc src/main.o src/save.o src/game.o src/play.o src/bounty.o src/env-sdl.o src/ui.o src/rogue.o vendor/scale2x.o vendor/inprint.o vendor/savepng.o src/libkb.a -L/usr/lib/x86_64-linux-gnu -lSDL -lpng -lSDL_image -o openkb
    src/game.o: In function show_credits': /home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/src/game.c:703: undefined reference toKB_Pause'
    src/game.o: In function draw_map': /home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/src/game.c:1192: undefined reference toKB_GetMapTile'
    src/game.o: In function view_puzzle': /home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/src/game.c:1420: undefined reference toKB_GetMapTile'
    src/game.o: In function view_contract': /home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/src/game.c:1618: undefined reference toKB_Pause'
    src/game.o: In function draw_victory': /home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/src/game.c:3368: undefined reference toKB_Pause'
    src/game.o: In function accept_foe': /home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/src/game.c:3602: undefined reference toKB_Pause'
    src/game.o: In function end_of_week': /home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/src/game.c:3739: undefined reference toKB_Pause'
    src/game.o: In function no_spell_banner': /home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/src/game.c:3760: undefined reference toKB_Pause'
    src/game.o:/home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/src/game.c:3842: more undefined references to KB_Pause' follow src/game.o: In functionchoose_spell':
    /home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/src/game.c:4152: undefined reference to KB_Wait' /home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/src/game.c:4222: undefined reference toKB_Pause'
    src/game.o: In function debug_cheat_menu': /home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/src/game.c:5042: undefined reference toKB_Wait'
    src/ui.o: In function KB_MessageBox': /home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/src/ui.c:599: undefined reference toKB_Pause'
    src/ui.o: In function KB_BottomBox': /home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/src/ui.c:659: undefined reference toKB_Pause'
    /home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/src/ui.c:660: undefined reference to KB_Wait' src/ui.o: In functionKB_TopBox':
    /home/alexander/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code/src/ui.c:699: undefined reference to `KB_Wait'
    collect2: error: ld returned 1 exit status
    Makefile:88: recipe for target 'openkb' failed
    make:
    ** [openkb] Error 1
    alexander@alexander-Ubuntu:~/Downloads/openkb-code-4505e234c6ae34c8088033fc38efa2adf64df8c4/openkb-code$

     
    • driedfruit

      driedfruit - 2018-05-04

      Thanks a lot! Could you please try the latest commit (yet again)?

      I've no idea why my gcc is not barking at me for doing such stupid things.

       
  • alex milar

    alex milar - 2018-05-13

    Now I am getting the vender/libhfs.a Error 2 again when using the latest version of the code. Their dosent apear to be a libhfs.a file, is that supposed to be created during the compiling.

    alexander@alexander-Ubuntu:~/Desktop/a folder/openkb-code-74f633fc0fee210a599047ff558984bdbc83345e$ ./autogen.sh
    Clearing cache...
    Running autoheader
    Running aclocal
    Running autoconf [twice]
    Running automake --add-mising (to get install-sh)
    You can run './configure' now
    alexander@alexander-Ubuntu:~/Desktop/a folder/openkb-code-74f633fc0fee210a599047ff558984bdbc83345e$ ./configure
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking for a BSD-compatible install... /usr/bin/install -c
    checking for sdl-config... /usr/bin/sdl-config
    checking for SDL_Init in -lSDL... yes
    checking for IMG_Load in -lSDL_image... yes
    checking for SDLNet_Init in -lSDL_net... no
    checking for png_create_write_struct in -lpng... yes
    checking how to run the C preprocessor... gcc -E
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for string.h... (cached) yes
    checking malloc.h usability... yes
    checking malloc.h presence... yes
    checking for malloc.h... yes
    checking endian.h usability... yes
    checking endian.h presence... yes
    checking for endian.h... yes
    checking for inline... inline
    checking for size_t... yes
    checking for stdlib.h... (cached) yes
    checking for GNU libc compatible malloc... yes
    checking for isascii... yes
    checking for mkdir... yes
    checking for strcasecmp... yes
    checking for strlcpy... no
    checking for strlcat... no
    checking for strdup... yes
    checking for getcwd... yes
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating src/config.h
    alexander@alexander-Ubuntu:~/Desktop/a folder/openkb-code-74f633fc0fee210a599047ff558984bdbc83345e$ make vendor
    vendor/drop.sh vendor/
    Cloning into 'vendor/SDL_inprint'...
    remote: Counting objects: 126, done.
    remote: Total 126 (delta 0), reused 0 (delta 0), pack-reused 126
    Receiving objects: 100% (126/126), 26.60 KiB | 272.00 KiB/s, done.
    Resolving deltas: 100% (69/69), done.
    Cloning into 'vendor/SDL_SavePNG'...
    remote: Counting objects: 56, done.
    remote: Total 56 (delta 0), reused 0 (delta 0), pack-reused 56
    Receiving objects: 100% (56/56), 11.20 KiB | 122.00 KiB/s, done.
    Resolving deltas: 100% (28/28), done.
    tar: A lone zero block at 2060
    alexander@alexander-Ubuntu:~/Desktop/a folder/openkb-code-74f633fc0fee210a599047ff558984bdbc83345e$ make
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/main.c -o src/main.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/save.c -o src/save.o
    src/save.c: In function ‘KB_loadDAT’:
    src/save.c:272:31: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
    fprintf(stdout, "Save file: %d bytes (needed %d)\n", p - &buf[0], DAT_SIZE);
    ~^ ~~~~~~~~~~~
    %ld
    src/save.c: In function ‘KB_loadDAT_amiga’:
    src/save.c:532:31: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
    fprintf(stdout, "Save file: %d bytes (needed %d)\n", p - &buf[0], DAT_SIZE);
    ~^ ~~~~~~~~~~~
    %ld
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/game.c -o src/game.o
    src/game.c: In function ‘debug_cheat_menu’:
    src/game.c:4952:14: warning: ‘return’ with no value, in function returning non-void
    if (!txt) return;
    ^~~~~~
    src/game.c:4918:5: note: declared here
    int debug_cheat_menu(KBgame game, KBcombat war) {
    ^~~~~~~~~~~~~~~~
    src/game.c:4969:27: warning: ‘return’ with no value, in function returning non-void
    if (troop_id == 0xFF) return;
    ^~~~~~
    src/game.c:4918:5: note: declared here
    int debug_cheat_menu(KBgame game, KBcombat war) {
    ^~~~~~~~~~~~~~~~
    src/game.c:4976:14: warning: ‘return’ with no value, in function returning non-void
    if (!txt) return;
    ^~~~~~
    src/game.c:4918:5: note: declared here
    int debug_cheat_menu(KBgame game, KBcombat war) {
    ^~~~~~~~~~~~~~~~
    src/game.c:4982:4: warning: ‘return’ with no value, in function returning non-void
    return;
    ^~~~~~
    src/game.c:4918:5: note: declared here
    int debug_cheat_menu(KBgame game, KBcombat war) {
    ^~~~~~~~~~~~~~~~
    src/game.c:4995:4: warning: ‘return’ with no value, in function returning non-void
    return;
    ^~~~~~
    src/game.c:4918:5: note: declared here
    int debug_cheat_menu(KBgame game, KBcombat war) {
    ^~~~~~~~~~~~~~~~
    src/game.c:4999:4: warning: ‘return’ with no value, in function returning non-void
    return;
    ^~~~~~
    src/game.c:4918:5: note: declared here
    int debug_cheat_menu(KBgame game, KBcombat war) {
    ^~~~~~~~~~~~~~~~
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/play.c -o src/play.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/bounty.c -o src/bounty.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/env-sdl.c -o src/env-sdl.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/ui.c -o src/ui.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/rogue.c -o src/rogue.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT vendor/strlcat.c -o vendor/strlcat.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT vendor/strlcpy.c -o vendor/strlcpy.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/kbstd.c -o src/lib/kbstd.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/kbconf.c -o src/lib/kbconf.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/kbfile.c -o src/lib/kbfile.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/kbdir.c -o src/lib/kbdir.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/kbres.c -o src/lib/kbres.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/free-data.c -o src/lib/free-data.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/dos-data.c -o src/lib/dos-data.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/dos-cc.c -o src/lib/dos-cc.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/dos-img.c -o src/lib/dos-img.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/dos-snd.c -o src/lib/dos-snd.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/dos-exe.c -o src/lib/dos-exe.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/md-rom.c -o src/lib/md-rom.o
    gcc -c -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT src/lib/kbauto.c -o src/lib/kbauto.o
    make -C vendor/libhfs
    make[1]: Entering directory '/home/alexander/Desktop/a folder/openkb-code-74f633fc0fee210a599047ff558984bdbc83345e/vendor/libhfs'
    make[1]: No targets specified and no makefile found. Stop.
    make[1]: Leaving directory '/home/alexander/Desktop/a folder/openkb-code-74f633fc0fee210a599047ff558984bdbc83345e/vendor/libhfs'
    Makefile:77: recipe for target 'vendor/libhfs.a' failed
    make:
    [vendor/libhfs.a] Error 2
    alexander@alexander-Ubuntu:~/Desktop/a folder/openkb-code-74f633fc0fee210a599047ff558984bdbc83345e$

     
    • driedfruit

      driedfruit - 2018-06-08

      I think, for the time being, you'll have to use the steps outlined in this post,
      https://sourceforge.net/p/openkb/discussion/general/thread/cfcf735b/

      I'll make yet another attempt to fix this, sorry!

       

Anonymous
Anonymous

Add attachments
Cancel